From 4977d314fd7323b44776226fa6f37da6e6ac139e Mon Sep 17 00:00:00 2001 From: OrdosX Date: Sat, 6 Jul 2019 17:25:07 +0800 Subject: [PATCH] change two == to != --- sample/get_object.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/get_object.go b/sample/get_object.go index f7104b0e..0c1c819a 100644 --- a/sample/get_object.go +++ b/sample/get_object.go @@ -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() @@ -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()