diff --git a/api-bucket-replication.go b/api-bucket-replication.go index 73c751ff8..b12bb13a6 100644 --- a/api-bucket-replication.go +++ b/api-bucket-replication.go @@ -219,7 +219,7 @@ func (c *Client) ResetBucketReplicationOnTarget(ctx context.Context, bucketName // ResetBucketReplication kicks off replication of previously replicated objects if ExistingObjectReplication // is enabled in the replication config -func (c *Client) resetBucketReplicationOnTarget(ctx context.Context, bucketName string, olderThan time.Duration, tgtArn string, resetID string) (rinfo replication.ResyncTargetsInfo, err error) { +func (c *Client) resetBucketReplicationOnTarget(ctx context.Context, bucketName string, olderThan time.Duration, tgtArn, resetID string) (rinfo replication.ResyncTargetsInfo, err error) { // Input validation. if err = s3utils.CheckValidBucketName(bucketName); err != nil { return diff --git a/api-compose-object.go b/api-compose-object.go index 38c25ab94..e64a24458 100644 --- a/api-compose-object.go +++ b/api-compose-object.go @@ -286,8 +286,8 @@ func (c *Client) copyObjectDo(ctx context.Context, srcBucket, srcObject, destBuc return objInfo, nil } -func (c *Client) copyObjectPartDo(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, uploadID string, - partID int, startOffset int64, length int64, metadata map[string]string, +func (c *Client) copyObjectPartDo(ctx context.Context, srcBucket, srcObject, destBucket, destObject, uploadID string, + partID int, startOffset, length int64, metadata map[string]string, ) (p CompletePart, err error) { headers := make(http.Header) diff --git a/api-list.go b/api-list.go index 3b50f61d3..31b6edf2e 100644 --- a/api-list.go +++ b/api-list.go @@ -176,7 +176,7 @@ func (c *Client) listObjectsV2(ctx context.Context, bucketName string, opts List // ?delimiter - A delimiter is a character you use to group keys. // ?start-after - Sets a marker to start listing lexically at this key onwards. // ?max-keys - Sets the maximum number of keys returned in the response body. -func (c *Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter string, startAfter string, maxkeys int, headers http.Header) (ListBucketV2Result, error) { +func (c *Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter, startAfter string, maxkeys int, headers http.Header) (ListBucketV2Result, error) { // Validate bucket name. if err := s3utils.CheckValidBucketName(bucketName); err != nil { return ListBucketV2Result{}, err diff --git a/api-presigned.go b/api-presigned.go index 2e4bacf12..9e85f8181 100644 --- a/api-presigned.go +++ b/api-presigned.go @@ -30,7 +30,7 @@ import ( // presignURL - Returns a presigned URL for an input 'method'. // Expires maximum is 7days - ie. 604800 and minimum is 1. -func (c *Client) presignURL(ctx context.Context, method string, bucketName string, objectName string, expires time.Duration, reqParams url.Values, extraHeaders http.Header) (u *url.URL, err error) { +func (c *Client) presignURL(ctx context.Context, method, bucketName, objectName string, expires time.Duration, reqParams url.Values, extraHeaders http.Header) (u *url.URL, err error) { // Input validation. if method == "" { return nil, errInvalidArgument("method cannot be empty.") @@ -66,7 +66,7 @@ func (c *Client) presignURL(ctx context.Context, method string, bucketName strin // data without credentials. URL can have a maximum expiry of // upto 7days or a minimum of 1sec. Additionally you can override // a set of response headers using the query parameters. -func (c *Client) PresignedGetObject(ctx context.Context, bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { +func (c *Client) PresignedGetObject(ctx context.Context, bucketName, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { if err = s3utils.CheckValidObjectName(objectName); err != nil { return nil, err } @@ -77,7 +77,7 @@ func (c *Client) PresignedGetObject(ctx context.Context, bucketName string, obje // object metadata without credentials. URL can have a maximum expiry // of upto 7days or a minimum of 1sec. Additionally you can override // a set of response headers using the query parameters. -func (c *Client) PresignedHeadObject(ctx context.Context, bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { +func (c *Client) PresignedHeadObject(ctx context.Context, bucketName, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { if err = s3utils.CheckValidObjectName(objectName); err != nil { return nil, err } @@ -87,7 +87,7 @@ func (c *Client) PresignedHeadObject(ctx context.Context, bucketName string, obj // PresignedPutObject - Returns a presigned URL to upload an object // without credentials. URL can have a maximum expiry of upto 7days // or a minimum of 1sec. -func (c *Client) PresignedPutObject(ctx context.Context, bucketName string, objectName string, expires time.Duration) (u *url.URL, err error) { +func (c *Client) PresignedPutObject(ctx context.Context, bucketName, objectName string, expires time.Duration) (u *url.URL, err error) { if err = s3utils.CheckValidObjectName(objectName); err != nil { return nil, err } @@ -101,14 +101,14 @@ func (c *Client) PresignedPutObject(ctx context.Context, bucketName string, obje // // FIXME: The extra header parameter should be included in Presign() in the next // major version bump, and this function should then be deprecated. -func (c *Client) PresignHeader(ctx context.Context, method string, bucketName string, objectName string, expires time.Duration, reqParams url.Values, extraHeaders http.Header) (u *url.URL, err error) { +func (c *Client) PresignHeader(ctx context.Context, method, bucketName, objectName string, expires time.Duration, reqParams url.Values, extraHeaders http.Header) (u *url.URL, err error) { return c.presignURL(ctx, method, bucketName, objectName, expires, reqParams, extraHeaders) } // Presign - returns a presigned URL for any http method of your choice along // with custom request params and extra signed headers. URL can have a maximum // expiry of upto 7days or a minimum of 1sec. -func (c *Client) Presign(ctx context.Context, method string, bucketName string, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { +func (c *Client) Presign(ctx context.Context, method, bucketName, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) { return c.presignURL(ctx, method, bucketName, objectName, expires, reqParams, nil) } diff --git a/api-put-bucket.go b/api-put-bucket.go index 1a6db3e10..737666937 100644 --- a/api-put-bucket.go +++ b/api-put-bucket.go @@ -42,7 +42,7 @@ func (c *Client) makeBucket(ctx context.Context, bucketName string, opts MakeBuc return err } -func (c *Client) doMakeBucket(ctx context.Context, bucketName string, location string, objectLockEnabled bool) (err error) { +func (c *Client) doMakeBucket(ctx context.Context, bucketName, location string, objectLockEnabled bool) (err error) { defer func() { // Save the location into cache on a successful makeBucket response. if err == nil { diff --git a/api-put-object-common.go b/api-put-object-common.go index 7fad7600c..9ccb97cbb 100644 --- a/api-put-object-common.go +++ b/api-put-object-common.go @@ -68,7 +68,7 @@ func isReadAt(reader io.Reader) (ok bool) { // maxPartsCount - 10000 // minPartSize - 16MiB // maxMultipartPutObjectSize - 5TiB -func OptimalPartInfo(objectSize int64, configuredPartSize uint64) (totalPartsCount int, partSize int64, lastPartSize int64, err error) { +func OptimalPartInfo(objectSize int64, configuredPartSize uint64) (totalPartsCount int, partSize, lastPartSize int64, err error) { // object size is '-1' set it to 5TiB. var unknownSize bool if objectSize == -1 { diff --git a/api.go b/api.go index 5309a9669..3462add85 100644 --- a/api.go +++ b/api.go @@ -278,7 +278,7 @@ func privateNew(endpoint string, opts *Options) (*Client, error) { } // SetAppInfo - add application details to user agent. -func (c *Client) SetAppInfo(appName string, appVersion string) { +func (c *Client) SetAppInfo(appName, appVersion string) { // if app name and version not set, we do not set a new user agent. if appName != "" && appVersion != "" { c.appInfo.appName = appName diff --git a/bucket-cache.go b/bucket-cache.go index 3745ce34c..b1d3b3852 100644 --- a/bucket-cache.go +++ b/bucket-cache.go @@ -58,7 +58,7 @@ func (r *bucketLocationCache) Get(bucketName string) (location string, ok bool) } // Set - Will persist a value into cache. -func (r *bucketLocationCache) Set(bucketName string, location string) { +func (r *bucketLocationCache) Set(bucketName, location string) { r.Lock() defer r.Unlock() r.items[bucketName] = location diff --git a/core.go b/core.go index e186b9737..132ea702f 100644 --- a/core.go +++ b/core.go @@ -62,7 +62,7 @@ func (c Core) CopyObject(ctx context.Context, sourceBucket, sourceObject, destBu // CopyObjectPart - creates a part in a multipart upload by copying (a // part of) an existing object. -func (c Core) CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject string, uploadID string, +func (c Core) CopyObjectPart(ctx context.Context, srcBucket, srcObject, destBucket, destObject, uploadID string, partID int, startOffset, length int64, metadata map[string]string, ) (p CompletePart, err error) { return c.copyObjectPartDo(ctx, srcBucket, srcObject, destBucket, destObject, uploadID, @@ -115,7 +115,7 @@ func (c Core) PutObjectPart(ctx context.Context, bucket, object, uploadID string } // ListObjectParts - List uploaded parts of an incomplete upload.x -func (c Core) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker int, maxParts int) (result ListObjectPartsResult, err error) { +func (c Core) ListObjectParts(ctx context.Context, bucket, object, uploadID string, partNumberMarker, maxParts int) (result ListObjectPartsResult, err error) { return c.listObjectPartsQuery(ctx, bucket, object, uploadID, partNumberMarker, maxParts) } diff --git a/functional_tests.go b/functional_tests.go index 3c83d6f64..f951cd073 100644 --- a/functional_tests.go +++ b/functional_tests.go @@ -141,7 +141,7 @@ func cleanEmptyEntries(fields log.Fields) log.Fields { } // log successful test runs -func successLogger(testName string, function string, args map[string]interface{}, startTime time.Time) *log.Entry { +func successLogger(testName, function string, args map[string]interface{}, startTime time.Time) *log.Entry { // calculate the test case duration duration := time.Since(startTime) // log with the fields as per mint @@ -151,7 +151,7 @@ func successLogger(testName string, function string, args map[string]interface{} // As few of the features are not available in Gateway(s) currently, Check if err value is NotImplemented, // and log as NA in that case and continue execution. Otherwise log as failure and return -func logError(testName string, function string, args map[string]interface{}, startTime time.Time, alert string, message string, err error) { +func logError(testName, function string, args map[string]interface{}, startTime time.Time, alert, message string, err error) { // If server returns NotImplemented we assume it is gateway mode and hence log it as info and move on to next tests // Special case for ComposeObject API as it is implemented on client side and adds specific error details like `Error in upload-part-copy` in // addition to NotImplemented error returned from server @@ -165,7 +165,7 @@ func logError(testName string, function string, args map[string]interface{}, sta } // log failed test runs -func failureLog(testName string, function string, args map[string]interface{}, startTime time.Time, alert string, message string, err error) *log.Entry { +func failureLog(testName, function string, args map[string]interface{}, startTime time.Time, alert, message string, err error) *log.Entry { // calculate the test case duration duration := time.Since(startTime) var fields log.Fields @@ -185,7 +185,7 @@ func failureLog(testName string, function string, args map[string]interface{}, s } // log not applicable test runs -func ignoredLog(testName string, function string, args map[string]interface{}, startTime time.Time, alert string) *log.Entry { +func ignoredLog(testName, function string, args map[string]interface{}, startTime time.Time, alert string) *log.Entry { // calculate the test case duration duration := time.Since(startTime) // log with the fields as per mint diff --git a/pkg/credentials/file_aws_credentials.go b/pkg/credentials/file_aws_credentials.go index da09707e3..5b073763e 100644 --- a/pkg/credentials/file_aws_credentials.go +++ b/pkg/credentials/file_aws_credentials.go @@ -64,7 +64,7 @@ type FileAWSCredentials struct { // NewFileAWSCredentials returns a pointer to a new Credentials object // wrapping the Profile file provider. -func NewFileAWSCredentials(filename string, profile string) *Credentials { +func NewFileAWSCredentials(filename, profile string) *Credentials { return New(&FileAWSCredentials{ Filename: filename, Profile: profile, diff --git a/pkg/credentials/file_minio_client.go b/pkg/credentials/file_minio_client.go index e4c0f6717..eb777675b 100644 --- a/pkg/credentials/file_minio_client.go +++ b/pkg/credentials/file_minio_client.go @@ -49,7 +49,7 @@ type FileMinioClient struct { // NewFileMinioClient returns a pointer to a new Credentials object // wrapping the Alias file provider. -func NewFileMinioClient(filename string, alias string) *Credentials { +func NewFileMinioClient(filename, alias string) *Credentials { return New(&FileMinioClient{ Filename: filename, Alias: alias, diff --git a/pkg/credentials/iam_aws.go b/pkg/credentials/iam_aws.go index e641639c9..8dd621004 100644 --- a/pkg/credentials/iam_aws.go +++ b/pkg/credentials/iam_aws.go @@ -227,7 +227,7 @@ func listRoleNames(client *http.Client, u *url.URL, token string) ([]string, err return credsList, nil } -func getEcsTaskCredentials(client *http.Client, endpoint string, token string) (ec2RoleCredRespBody, error) { +func getEcsTaskCredentials(client *http.Client, endpoint, token string) (ec2RoleCredRespBody, error) { req, err := http.NewRequest(http.MethodGet, endpoint, nil) if err != nil { return ec2RoleCredRespBody{}, err diff --git a/pkg/policy/bucket-policy-condition.go b/pkg/policy/bucket-policy-condition.go index 04da742dc..feddc7755 100644 --- a/pkg/policy/bucket-policy-condition.go +++ b/pkg/policy/bucket-policy-condition.go @@ -61,7 +61,7 @@ func CopyConditionKeyMap(condKeyMap ConditionKeyMap) ConditionKeyMap { } // mergeConditionKeyMap - returns a new ConditionKeyMap which contains merged key/value of given two ConditionKeyMap. -func mergeConditionKeyMap(condKeyMap1 ConditionKeyMap, condKeyMap2 ConditionKeyMap) ConditionKeyMap { +func mergeConditionKeyMap(condKeyMap1, condKeyMap2 ConditionKeyMap) ConditionKeyMap { out := CopyConditionKeyMap(condKeyMap1) for k, v := range condKeyMap2 { @@ -93,7 +93,7 @@ func (cond ConditionMap) Remove(condKey string) { } // mergeConditionMap - returns new ConditionMap which contains merged key/value of two ConditionMap. -func mergeConditionMap(condMap1 ConditionMap, condMap2 ConditionMap) ConditionMap { +func mergeConditionMap(condMap1, condMap2 ConditionMap) ConditionMap { out := make(ConditionMap) for k, v := range condMap1 { diff --git a/pkg/policy/bucket-policy.go b/pkg/policy/bucket-policy.go index b52bb2e13..20ec18088 100644 --- a/pkg/policy/bucket-policy.go +++ b/pkg/policy/bucket-policy.go @@ -74,7 +74,7 @@ var validActions = commonBucketActions. Union(readOnlyObjectActions). Union(writeOnlyObjectActions) -var startsWithFunc = func(resource string, resourcePrefix string) bool { +var startsWithFunc = func(resource, resourcePrefix string) bool { return strings.HasPrefix(resource, resourcePrefix) } @@ -154,7 +154,7 @@ func isValidStatement(statement Statement, bucketName string) bool { } // Returns new statements with bucket actions for given policy. -func newBucketStatement(policy BucketPolicy, bucketName string, prefix string) (statements []Statement) { +func newBucketStatement(policy BucketPolicy, bucketName, prefix string) (statements []Statement) { statements = []Statement{} if policy == BucketPolicyNone || bucketName == "" { return statements @@ -204,7 +204,7 @@ func newBucketStatement(policy BucketPolicy, bucketName string, prefix string) ( } // Returns new statements contains object actions for given policy. -func newObjectStatement(policy BucketPolicy, bucketName string, prefix string) (statements []Statement) { +func newObjectStatement(policy BucketPolicy, bucketName, prefix string) (statements []Statement) { statements = []Statement{} if policy == BucketPolicyNone || bucketName == "" { return statements @@ -230,7 +230,7 @@ func newObjectStatement(policy BucketPolicy, bucketName string, prefix string) ( } // Returns new statements for given policy, bucket and prefix. -func newStatements(policy BucketPolicy, bucketName string, prefix string) (statements []Statement) { +func newStatements(policy BucketPolicy, bucketName, prefix string) (statements []Statement) { statements = []Statement{} ns := newBucketStatement(policy, bucketName, prefix) statements = append(statements, ns...) @@ -242,7 +242,7 @@ func newStatements(policy BucketPolicy, bucketName string, prefix string) (state } // Returns whether given bucket statements are used by other than given prefix statements. -func getInUsePolicy(statements []Statement, bucketName string, prefix string) (readOnlyInUse, writeOnlyInUse bool) { +func getInUsePolicy(statements []Statement, bucketName, prefix string) (readOnlyInUse, writeOnlyInUse bool) { resourcePrefix := awsResourcePrefix + bucketName + "/" objectResource := awsResourcePrefix + bucketName + "/" + prefix + "*" @@ -279,7 +279,7 @@ func removeObjectActions(statement Statement, objectResource string) Statement { } // Removes bucket actions for given policy in given statement. -func removeBucketActions(statement Statement, prefix string, bucketResource string, readOnlyInUse, writeOnlyInUse bool) Statement { +func removeBucketActions(statement Statement, prefix, bucketResource string, readOnlyInUse, writeOnlyInUse bool) Statement { removeReadOnly := func() { if !statement.Actions.Intersection(readOnlyBucketActions).Equals(readOnlyBucketActions) { return @@ -341,7 +341,7 @@ func removeBucketActions(statement Statement, prefix string, bucketResource stri // Returns statements containing removed actions/statements for given // policy, bucket name and prefix. -func removeStatements(statements []Statement, bucketName string, prefix string) []Statement { +func removeStatements(statements []Statement, bucketName, prefix string) []Statement { bucketResource := awsResourcePrefix + bucketName objectResource := awsResourcePrefix + bucketName + "/" + prefix + "*" readOnlyInUse, writeOnlyInUse := getInUsePolicy(statements, bucketName, prefix) @@ -473,7 +473,7 @@ func appendStatement(statements []Statement, statement Statement) []Statement { } // Appends two statement lists. -func appendStatements(statements []Statement, appendStatements []Statement) []Statement { +func appendStatements(statements, appendStatements []Statement) []Statement { for _, s := range appendStatements { statements = appendStatement(statements, s) } @@ -523,7 +523,7 @@ func getBucketPolicy(statement Statement, prefix string) (commonFound, readOnly, } // Returns policy of given object statement. -func getObjectPolicy(statement Statement) (readOnly bool, writeOnly bool) { +func getObjectPolicy(statement Statement) (readOnly, writeOnly bool) { if statement.Effect == "Allow" && statement.Principal.AWS.Contains("*") && statement.Conditions == nil { @@ -539,7 +539,7 @@ func getObjectPolicy(statement Statement) (readOnly bool, writeOnly bool) { } // GetPolicy - Returns policy of given bucket name, prefix in given statements. -func GetPolicy(statements []Statement, bucketName string, prefix string) BucketPolicy { +func GetPolicy(statements []Statement, bucketName, prefix string) BucketPolicy { bucketResource := awsResourcePrefix + bucketName objectResource := awsResourcePrefix + bucketName + "/" + prefix + "*" @@ -625,7 +625,7 @@ func GetPolicies(statements []Statement, bucketName, prefix string) map[string]B } // SetPolicy - Returns new statements containing policy of given bucket name and prefix are appended. -func SetPolicy(statements []Statement, policy BucketPolicy, bucketName string, prefix string) []Statement { +func SetPolicy(statements []Statement, policy BucketPolicy, bucketName, prefix string) []Statement { out := removeStatements(statements, bucketName, prefix) // fmt.Println("out = ") // printstatement(out) diff --git a/pkg/set/stringset_test.go b/pkg/set/stringset_test.go index 12aa6f90a..ec6dfbe63 100644 --- a/pkg/set/stringset_test.go +++ b/pkg/set/stringset_test.go @@ -126,11 +126,11 @@ func TestStringSetFuncMatch(t *testing.T) { expectedResult string }{ // Test to check match function doing case insensive compare. - {func(setValue string, compareValue string) bool { + {func(setValue, compareValue string) bool { return strings.EqualFold(setValue, compareValue) }, "Bar", `[bar]`}, // Test to check match function doing prefix check. - {func(setValue string, compareValue string) bool { + {func(setValue, compareValue string) bool { return strings.HasPrefix(compareValue, setValue) }, "foobar", `[foo]`}, } diff --git a/pkg/signer/utils.go b/pkg/signer/utils.go index 333f1aa25..87c993989 100644 --- a/pkg/signer/utils.go +++ b/pkg/signer/utils.go @@ -35,7 +35,7 @@ func sum256(data []byte) []byte { } // sumHMAC calculate hmac between two input byte array. -func sumHMAC(key []byte, data []byte) []byte { +func sumHMAC(key, data []byte) []byte { hash := hmac.New(sha256.New, key) hash.Write(data) return hash.Sum(nil) diff --git a/post-policy.go b/post-policy.go index 0191909bd..3f4881e82 100644 --- a/post-policy.go +++ b/post-policy.go @@ -241,7 +241,7 @@ func (p *PostPolicy) SetSuccessStatusAction(status string) error { // SetUserMetadata - Set user metadata as a key/value couple. // Can be retrieved through a HEAD request or an event. -func (p *PostPolicy) SetUserMetadata(key string, value string) error { +func (p *PostPolicy) SetUserMetadata(key, value string) error { if strings.TrimSpace(key) == "" || key == "" { return errInvalidArgument("Key is empty") } @@ -283,7 +283,7 @@ func (p *PostPolicy) SetEncryption(sse encrypt.ServerSide) { // SetUserData - Set user data as a key/value couple. // Can be retrieved through a HEAD request or an event. -func (p *PostPolicy) SetUserData(key string, value string) error { +func (p *PostPolicy) SetUserData(key, value string) error { if key == "" { return errInvalidArgument("Key is empty") } diff --git a/retry-continous.go b/retry-continous.go index b54081d0d..bfeea95f3 100644 --- a/retry-continous.go +++ b/retry-continous.go @@ -20,7 +20,7 @@ package minio import "time" // newRetryTimerContinous creates a timer with exponentially increasing delays forever. -func (c *Client) newRetryTimerContinous(unit time.Duration, cap time.Duration, jitter float64, doneCh chan struct{}) <-chan int { +func (c *Client) newRetryTimerContinous(unit, cap time.Duration, jitter float64, doneCh chan struct{}) <-chan int { attemptCh := make(chan int) // normalize jitter to the range [0, 1.0] diff --git a/retry.go b/retry.go index 055c14c4d..1c6105e6a 100644 --- a/retry.go +++ b/retry.go @@ -45,7 +45,7 @@ var DefaultRetryCap = time.Second // newRetryTimer creates a timer with exponentially increasing // delays until the maximum retry attempts are reached. -func (c *Client) newRetryTimer(ctx context.Context, maxRetry int, unit time.Duration, cap time.Duration, jitter float64) <-chan int { +func (c *Client) newRetryTimer(ctx context.Context, maxRetry int, unit, cap time.Duration, jitter float64) <-chan int { attemptCh := make(chan int) // computes the exponential backoff duration according to diff --git a/utils.go b/utils.go index 9389a7faf..6a93561ea 100644 --- a/utils.go +++ b/utils.go @@ -255,7 +255,7 @@ func parseRFC7231Time(lastModified string) (time.Time, error) { // ToObjectInfo converts http header values into ObjectInfo type, // extracts metadata and fills in all the necessary fields in ObjectInfo. -func ToObjectInfo(bucketName string, objectName string, h http.Header) (ObjectInfo, error) { +func ToObjectInfo(bucketName, objectName string, h http.Header) (ObjectInfo, error) { var err error // Trim off the odd double quotes from ETag in the beginning and end. etag := trimEtag(h.Get("ETag"))