diff --git a/s3/container.go b/s3/container.go index 3783103..a54e8be 100644 --- a/s3/container.go +++ b/s3/container.go @@ -164,8 +164,9 @@ func (c *container) Put(name string, r io.Reader, size int64, metadata map[strin Key: aws.String(name), Bucket: aws.String(c.name), }) + var etag string - if i.ETag != nil && err == nil { + if err == nil && i.ETag != nil { etag = cleanEtag(*i.ETag) }