Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-11-16 16:05:36 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-11-16 16:05:36 +0300
commitdff59f10c72bd1d0c23fa0486150257e29ee9ae0 (patch)
treec5095ebf8340ad6f3df2ca5262256b6b28dedc13
parenta725e05185fab183f8093c0358c4807f032af565 (diff)
refactor: move away from error '==' comparison
-rw-r--r--internal/vfs/zip/vfs.go4
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
}