mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
ci: update golangci-lint version (#1834)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
7ce5a74598
commit
1675f30d4a
@@ -71,7 +71,7 @@ func NewController(config *config.Config) *Controller {
|
||||
func DumpRuntimeParams(log log.Logger) {
|
||||
var rLimit syscall.Rlimit
|
||||
|
||||
evt := log.Info().Int("cpus", runtime.NumCPU())
|
||||
evt := log.Info().Int("cpus", runtime.NumCPU()) //nolint: zerologlint
|
||||
|
||||
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
||||
if err == nil {
|
||||
|
||||
@@ -2111,6 +2111,7 @@ func (rh *RouteHandler) CreateAPIKey(resp http.ResponseWriter, req *http.Request
|
||||
expirationDate := time.Time{}
|
||||
|
||||
if payload.ExpirationDate != "" {
|
||||
//nolint: gosmopolitan
|
||||
expirationDate, err = time.ParseInLocation(constants.APIKeyTimeFormat, payload.ExpirationDate, time.Local)
|
||||
if err != nil {
|
||||
resp.WriteHeader(http.StatusBadRequest)
|
||||
|
||||
@@ -546,7 +546,7 @@ func TestRoutes(t *testing.T) {
|
||||
},
|
||||
&mocks.MockedImageStore{
|
||||
GetBlobFn: func(repo string, digest godigest.Digest, mediaType string) (io.ReadCloser, int64, error) {
|
||||
return io.NopCloser(bytes.NewBuffer([]byte(""))), 0, zerr.ErrRepoNotFound
|
||||
return io.NopCloser(bytes.NewBufferString("")), 0, zerr.ErrRepoNotFound
|
||||
},
|
||||
})
|
||||
So(statusCode, ShouldEqual, http.StatusNotFound)
|
||||
@@ -559,7 +559,7 @@ func TestRoutes(t *testing.T) {
|
||||
},
|
||||
&mocks.MockedImageStore{
|
||||
GetBlobFn: func(repo string, digest godigest.Digest, mediaType string) (io.ReadCloser, int64, error) {
|
||||
return io.NopCloser(bytes.NewBuffer([]byte(""))), 0, zerr.ErrBadBlobDigest
|
||||
return io.NopCloser(bytes.NewBufferString("")), 0, zerr.ErrBadBlobDigest
|
||||
},
|
||||
})
|
||||
So(statusCode, ShouldEqual, http.StatusBadRequest)
|
||||
|
||||
Reference in New Issue
Block a user