From ddbb56178e13f23a7685b7d85a4dca59a4cec775 Mon Sep 17 00:00:00 2001 From: LaurentiuNiculae Date: Mon, 20 Mar 2023 18:34:04 +0200 Subject: [PATCH] fix(errors): remove direct dependency on 'github.com/pkg/errors' (#1275) Signed-off-by: Laurentiu Niculae --- pkg/extensions/lint/lint.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/extensions/lint/lint.go b/pkg/extensions/lint/lint.go index 118cf3e0..34864913 100644 --- a/pkg/extensions/lint/lint.go +++ b/pkg/extensions/lint/lint.go @@ -9,7 +9,6 @@ import ( godigest "github.com/opencontainers/go-digest" ispec "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" zerr "zotregistry.io/zot/errors" "zotregistry.io/zot/pkg/extensions/config" @@ -105,7 +104,7 @@ func (linter *Linter) CheckMandatoryAnnotations(repo string, manifestDigest godi string(manifestDigest), string(configDigest), missingAnnotations) linter.log.Error().Msg(msg) - return false, errors.WithMessage(zerr.ErrImageLintAnnotations, msg) + return false, fmt.Errorf("%s: %w", msg, zerr.ErrImageLintAnnotations) } return true, nil