diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-11-16 16:05:36 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-11-16 16:05:36 +0300 |
commit | dff59f10c72bd1d0c23fa0486150257e29ee9ae0 (patch) | |
tree | c5095ebf8340ad6f3df2ca5262256b6b28dedc13 | |
parent | a725e05185fab183f8093c0358c4807f032af565 (diff) |
refactor: move away from error '==' comparison
-rw-r--r-- | internal/vfs/zip/vfs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/vfs/zip/vfs.go b/internal/vfs/zip/vfs.go index 029874af..07afa691 100644 --- a/internal/vfs/zip/vfs.go +++ b/internal/vfs/zip/vfs.go @@ -179,12 +179,12 @@ func (zfs *zipVFS) Root(ctx context.Context, path string, cacheKey string) (vfs. // we do it in loop to not use any additional locks for { root, err := zfs.findOrOpenArchive(ctx, cacheKey, path) - if err == errAlreadyCached { + if errors.Is(err, errAlreadyCached) { continue } // If archive is not found, return a known `vfs` error - if err == httprange.ErrNotFound { + if errors.Is(err, httprange.ErrNotFound) { return nil, fs.ErrNotExist } |