0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

fix(errors): remove direct dependency on 'github.com/pkg/errors' (#1275)

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
LaurentiuNiculae 2023-03-20 18:34:04 +02:00 committed by GitHub
parent ed01292ad2
commit ddbb56178e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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