chore: update golang (to 1.20.x) and golangci-linter (#1388)

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2023-04-27 00:09:46 -07:00
committed by GitHub
parent 9cc990d7ca
commit 635d07ae04
30 changed files with 41 additions and 42 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const (
CosignType = "cosign"
)
// Used to model changes to an object after a call to the the DB.
// Used to model changes to an object after a call to the DB.
type ToggleState int
const (
+2 -2
View File
@@ -501,7 +501,7 @@ func RunRepoDBTests(repoDB repodb.RepoDB, preparationFuncs ...func() error) {
So(err, ShouldBeNil)
So(repoMeta.Stars, ShouldEqual, 0)
repoMeta, err = repoDB.GetRepoMeta("badRepo")
_, err = repoDB.GetRepoMeta("badRepo")
So(err, ShouldNotBeNil)
})
@@ -2663,7 +2663,7 @@ func generateTestImage() ([]byte, []byte, error) {
// init layers with random values
for i := range layers {
//nolint:gosec
_, err := rand.Read(layers[i])
_, err := rand.Read(layers[i]) //nolint:staticcheck
if err != nil {
return []byte{}, []byte{}, err
}
@@ -132,7 +132,7 @@ func toStringIfOk(cacheDriverConfig map[string]interface{}, param string, log lo
}
if str == "" {
log.Error().Msgf("parsing CacheDriver config failed, field '%s' is is empty", param)
log.Error().Msgf("parsing CacheDriver config failed, field '%s' is empty", param)
return "", false
}