Skip to content

Commit

Permalink
Adding comment and fixing capitalization of ETag constant
Browse files Browse the repository at this point in the history
  • Loading branch information
zveinn committed Jan 8, 2024
1 parent 7b33363 commit 4fd7afa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api-get-object-attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (c *Client) GetObjectAttributes(ctx context.Context, bucketName, objectName

defer closeResponse(resp)

hasEtag := resp.Header.Get(Etag)
hasEtag := resp.Header.Get(ETag)
if hasEtag != "" {
return ObjectAttributes{}, errors.New("getObjectAttributes is not supported by the current endpoint version")
}
Expand Down
4 changes: 3 additions & 1 deletion constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const (

const (
// Response Headers
Etag = "ETag"

// ETag is a common response header
ETag = "ETag"

// Storage class header.
amzStorageClass = "X-Amz-Storage-Class"
Expand Down

0 comments on commit 4fd7afa

Please sign in to comment.