Skip to content

Commit c838139

Browse files
authored
blob/gcsblob: Use errors.Is instead of direct equality check (#3529)
1 parent da0b8ec commit c838139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blob/gcsblob/gcsblob.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func (r *reader) As(i any) bool {
389389
}
390390

391391
func (b *bucket) ErrorCode(err error) gcerrors.ErrorCode {
392-
if err == storage.ErrObjectNotExist || err == storage.ErrBucketNotExist {
392+
if errors.Is(err, storage.ErrObjectNotExist) || errors.Is(err, storage.ErrBucketNotExist) {
393393
return gcerrors.NotFound
394394
}
395395
if gerr, ok := err.(*googleapi.Error); ok {

0 commit comments

Comments
 (0)