mirror of
https://github.com/distribution/distribution.git
synced 2025-09-20 02:34:27 +00:00
feat(linter): enable errcheck linter in golangci-lint
Also, bump the linter version to the latest available version. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/distribution/distribution/v3/registry/auth"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// accessController provides a simple implementation of auth.AccessController
|
||||
@@ -87,5 +88,7 @@ func (ch challenge) Error() string {
|
||||
|
||||
// init registers the silly auth backend.
|
||||
func init() {
|
||||
auth.Register("silly", auth.InitFunc(newAccessController))
|
||||
if err := auth.Register("silly", auth.InitFunc(newAccessController)); err != nil {
|
||||
logrus.Errorf("failed to register silly auth: %v", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user