diff options
Diffstat (limited to 'unmaintained/s3/presigned_put/presigned_put.go')
| -rw-r--r-- | unmaintained/s3/presigned_put/presigned_put.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unmaintained/s3/presigned_put/presigned_put.go b/unmaintained/s3/presigned_put/presigned_put.go index ba135ff25..1e591dff2 100644 --- a/unmaintained/s3/presigned_put/presigned_put.go +++ b/unmaintained/s3/presigned_put/presigned_put.go @@ -7,10 +7,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" - "github.com/seaweedfs/seaweedfs/weed/util" "net/http" "strings" "time" + util_http "github.com/seaweedfs/seaweedfs/weed/util/http" ) // Downloads an item from an S3 Bucket in the region configured in the shared config @@ -21,6 +21,8 @@ import ( // For this exampl to work, the domainName is needd // weed s3 -domainName=localhost func main() { + util_http.InitGlobalHttpClient() + h := md5.New() content := strings.NewReader(stringContent) content.WriteTo(h) @@ -64,7 +66,7 @@ func main() { fmt.Printf("error put request: %v\n", err) return } - defer util.CloseResponse(resp) + defer util_http.CloseResponse(resp) fmt.Printf("response: %+v\n", resp) } |
