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:
Milos Gajdos 2023-11-18 06:50:40 +00:00
parent 9610a1e618
commit 7ce129d63b
No known key found for this signature in database
36 changed files with 243 additions and 66 deletions

View file

@ -17,6 +17,7 @@ import (
"github.com/distribution/distribution/v3/internal/dcontext"
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
storagemiddleware "github.com/distribution/distribution/v3/registry/storage/driver/middleware"
"github.com/sirupsen/logrus"
)
// cloudFrontStorageMiddleware provides a simple implementation of layerHandler that
@ -226,5 +227,7 @@ func (lh *cloudFrontStorageMiddleware) RedirectURL(r *http.Request, path string)
// init registers the cloudfront layerHandler backend.
func init() {
storagemiddleware.Register("cloudfront", newCloudFrontStorageMiddleware)
if err := storagemiddleware.Register("cloudfront", newCloudFrontStorageMiddleware); err != nil {
logrus.Errorf("failed to register cloudfront middleware: %v", err)
}
}