Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sample/get_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func GetObjectSample() {

// Last modified time contraint is not met, do not download the file
body, err = bucket.GetObject(objectKey, oss.IfUnmodifiedSince(pastDate))
if err == nil {
if err != nil {
HandleError(err)
}
body.Close()
Expand All @@ -95,7 +95,7 @@ func GetObjectSample() {

// Check the content, etag contraint is not met, do not download the file
body, err = bucket.GetObject(objectKey, oss.IfNoneMatch(etag))
if err == nil {
if err != nil {
HandleError(err)
}
body.Close()
Expand Down