chore: update go and golanci lint (#810)

This PR updates go to 1.23.1 and updates golanci-lint to v1.61.1, while
fixing new lint errors.

---------

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
This commit is contained in:
Ramon Petgrave
2024-10-10 13:07:08 -04:00
committed by GitHub
parent 9093b4fd79
commit 4cd7d4802e
17 changed files with 89 additions and 170 deletions
+2 -8
View File
@@ -524,7 +524,6 @@ func Test_runVerifyGHAArtifactPath(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
// Avoid rate limiting by not running the tests in parallel.
// t.Parallel()
@@ -805,7 +804,6 @@ func Test_runVerifyGHAArtifactImage(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
@@ -866,7 +864,7 @@ func Test_runVerifyGHAArtifactImage(t *testing.T) {
outBuilderID, err := cmd.Exec(context.Background(), []string{image})
if !errCmp(err, tt.err) {
t.Errorf(cmp.Diff(err, tt.err, cmpopts.EquateErrors()))
t.Error(cmp.Diff(err, tt.err, cmpopts.EquateErrors()))
}
if err != nil {
@@ -1267,7 +1265,6 @@ func Test_runVerifyGCBArtifactImage(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
@@ -1335,7 +1332,7 @@ func Test_runVerifyGCBArtifactImage(t *testing.T) {
outBuilderID, err := cmd.Exec(context.Background(), []string{image})
if !errCmp(err, tt.err) {
t.Errorf(cmp.Diff(err, tt.err, cmpopts.EquateErrors()))
t.Error(cmp.Diff(err, tt.err, cmpopts.EquateErrors()))
}
if err != nil {
@@ -1432,7 +1429,6 @@ func Test_runVerifyGHAContainerBased(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
@@ -1958,7 +1954,6 @@ func Test_runVerifyNpmPackage(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
@@ -2023,7 +2018,6 @@ func Test_runVerifyVSA(t *testing.T) {
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()