mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
chore: fix dependabot alerts (#3070)
* chore: fix dependabot alerts Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * ci: fix linter config * fix: linter fixes Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cb9b82823a
commit
fd761c0254
@@ -44,7 +44,7 @@ import (
|
||||
type errReader int
|
||||
|
||||
func (errReader) Read(p []byte) (int, error) {
|
||||
return 0, errors.New("test error") //nolint:goerr113
|
||||
return 0, errors.New("test error") //nolint:err113
|
||||
}
|
||||
|
||||
func TestSignatureHandlers(t *testing.T) {
|
||||
|
||||
@@ -448,7 +448,7 @@ func (ms *metricServer) HistogramObserve(hv *HistogramValue) {
|
||||
}
|
||||
}
|
||||
|
||||
//nolint:goerr113
|
||||
//nolint:err113
|
||||
func sanityChecks(name string, knownLabels []string, found bool, labelNames, labelValues []string) error {
|
||||
if !found {
|
||||
return fmt.Errorf("metric %s: not found", name)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
godigest "github.com/opencontainers/go-digest"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type ImageCVESummary struct {
|
||||
|
||||
@@ -572,6 +572,6 @@ func TestScanGeneratorWithRealData(t *testing.T) {
|
||||
So(err, ShouldBeNil)
|
||||
So(cveSummary.Count, ShouldBeGreaterThanOrEqualTo, 5)
|
||||
// As of September 22 the max severity is MEDIUM, but new CVEs could appear in the future
|
||||
So([]string{"MEDIUM", "HIGH", "CRITICAL"}, ShouldContain, cveSummary.MaxSeverity)
|
||||
So([]string{"MEDIUM", "HIGH", "CRITICAL", "UNKNOWN"}, ShouldContain, cveSummary.MaxSeverity)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ func (httpClient *Client) MakeGetRequest(ctx context.Context, resultPtr interfac
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, nil, resp.StatusCode, errors.New(string(body)) //nolint:goerr113
|
||||
return nil, nil, resp.StatusCode, errors.New(string(body)) //nolint:err113
|
||||
}
|
||||
|
||||
// read blob
|
||||
|
||||
Reference in New Issue
Block a user