Skip to content

Commit ed2ce59

Browse files
Upgrade golangci-lint to 1.60.3
After upgrading to golang 1.23 golangci-lint 1.57.1 crashes on the first execution. Upgrade it to the version used in the branches 1.30 and 1.31. Signed-off-by: Juan-Luis de Sousa-Valadas Castaño <[email protected]>
1 parent 1c2a87e commit ed2ce59

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

hack/tools/Makefile.variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
controller-gen_version = 0.14.0
22
go-bindata_version = 3.23.0+incompatible
3-
golangci-lint_version = 1.57.1
3+
golangci-lint_version = 1.60.3

inttest/cli/cli_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (s *CliSuite) TestK0sCliKubectlAndResetCommand() {
6262
s.T().Run("sysinfoSmoketest", func(t *testing.T) {
6363
out, err := ssh.ExecWithOutput(s.Context(), fmt.Sprintf("%s sysinfo", s.K0sFullPath))
6464
assert.NoError(t, err, "k0s sysinfo has non-zero exit code")
65-
t.Logf(out)
65+
t.Log(out)
6666
assert.Regexp(t, "^Machine ID: ", out)
6767
assert.Regexp(t, "\nOperating system: Linux \\(pass\\)\n", out)
6868
assert.Regexp(t, "\n Linux kernel release: ", out)

pkg/apis/k0s/v1beta1/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (e *EtcdConfig) GetKeyFilePath(certDir string) string {
233233
func validateRequiredProperties(e *ExternalCluster) []error {
234234
var errors []error
235235

236-
if e.Endpoints == nil || len(e.Endpoints) == 0 {
236+
if len(e.Endpoints) == 0 {
237237
errors = append(errors, fmt.Errorf("spec.storage.etcd.externalCluster.endpoints cannot be null or empty"))
238238
} else if slices.Contains(e.Endpoints, "") {
239239
errors = append(errors, fmt.Errorf("spec.storage.etcd.externalCluster.endpoints cannot contain empty strings"))

pkg/cleanup/bridge_linux.go

-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package cleanup
1818

1919
import (
2020
"fmt"
21-
"runtime"
2221

2322
"github.com/vishvananda/netlink"
2423
)
@@ -32,10 +31,6 @@ func (b *bridge) Name() string {
3231

3332
// Run removes found kube-bridge leftovers
3433
func (b *bridge) Run() error {
35-
if runtime.GOOS == "windows" {
36-
return nil
37-
}
38-
3934
lnks, err := netlink.LinkList()
4035
if err != nil {
4136
return fmt.Errorf("failed to get link list from netlink: %v", err)

pkg/install/users.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package install
1818

1919
import (
2020
"errors"
21-
"fmt"
2221
"os/exec"
2322
"os/user"
2423
"reflect"
@@ -46,7 +45,7 @@ func CreateControllerUsers(clusterConfig *v1beta1.ClusterConfig, k0sVars *config
4645
}
4746
}
4847
if len(messages) > 0 {
49-
return fmt.Errorf(strings.Join(messages, "\n"))
48+
return errors.New(strings.Join(messages, "\n"))
5049
}
5150
return nil
5251
}
@@ -66,7 +65,7 @@ func DeleteControllerUsers(clusterConfig *v1beta1.ClusterConfig) error {
6665
}
6766
if len(messages) > 0 {
6867
// don't fail the command, just notify on errors
69-
return fmt.Errorf(strings.Join(messages, "\n"))
68+
return errors.New(strings.Join(messages, "\n"))
7069
}
7170
return nil
7271
}

0 commit comments

Comments
 (0)