Skip to content

Instantly share code, notes, and snippets.

@dkolbly
dkolbly / s3blob.go.patch
Created January 17, 2023 17:15
prototype for setting options using As() in gocloud.dev blob/s3
diff --git a/blob/s3blob/s3blob.go b/blob/s3blob/s3blob.go
index b697f237..b03ce956 100644
--- a/blob/s3blob/s3blob.go
+++ b/blob/s3blob/s3blob.go
@@ -44,9 +44,9 @@
// s3blob exposes the following types for As:
// - Bucket: (V1) *s3.S3; (V2) *s3v2.Client
// - Error: (V1) awserr.Error; (V2) any error type returned by the service, notably smithy.APIError
-// - ListObject: (V1) s3.Object for objects, s3.CommonPrefix for "directories"; (V2) typesv2.Object for objects, typesv2.CommonPrefix fo
r "directories
#! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Figuring out the angle at a vertex of a dodecahedron
# The vertices, as is easily discovered by google, are:
#
# (±1, ±1, ±1)
# (0, ±1/φ, ±φ)
# (±1/φ, ±φ, 0)
package main
import (
"archive/tar"
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"os"
)