diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 56dc6165f1..9d2e1bfae8 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -35,7 +35,7 @@ RUN GOPROXY=direct go get golang.org/x/tools/cmd/goimports@gopls/v0.7.0 RUN rm -rf /go/src /go/pkg RUN if [ "$(go env GOARCH)" = "amd64" ]; then \ - curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.41.1; \ + curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.45.2; \ fi ENV YQ_URL=https://github.com/mikefarah/yq/releases/download/v4.6.2/yq_linux diff --git a/pkg/agent/containerd/command.go b/pkg/agent/containerd/command.go index d5962f7661..e7180cc7ea 100644 --- a/pkg/agent/containerd/command.go +++ b/pkg/agent/containerd/command.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows package containerd diff --git a/pkg/agent/loadbalancer/utlity_linux.go b/pkg/agent/loadbalancer/utlity_linux.go index bd71f14c80..9ca9618328 100644 --- a/pkg/agent/loadbalancer/utlity_linux.go +++ b/pkg/agent/loadbalancer/utlity_linux.go @@ -1,4 +1,4 @@ -// +build linux +//go:build linux package loadbalancer diff --git a/pkg/agent/syssetup/setup.go b/pkg/agent/syssetup/setup.go index 12597c20c9..69029f70d2 100644 --- a/pkg/agent/syssetup/setup.go +++ b/pkg/agent/syssetup/setup.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows package syssetup diff --git a/pkg/agent/templates/templates_linux.go b/pkg/agent/templates/templates_linux.go index cb920beaa8..c03432deef 100644 --- a/pkg/agent/templates/templates_linux.go +++ b/pkg/agent/templates/templates_linux.go @@ -1,4 +1,4 @@ -// +build linux +//go:build linux package templates diff --git a/pkg/cli/cmds/const_linux.go b/pkg/cli/cmds/const_linux.go index 2543296660..3f95e93fad 100644 --- a/pkg/cli/cmds/const_linux.go +++ b/pkg/cli/cmds/const_linux.go @@ -1,4 +1,4 @@ -// +build linux +//go:build linux package cmds diff --git a/pkg/cli/cmds/init_linux.go b/pkg/cli/cmds/init_linux.go index 4258881240..d19f0de5ed 100644 --- a/pkg/cli/cmds/init_linux.go +++ b/pkg/cli/cmds/init_linux.go @@ -1,4 +1,4 @@ -// +build linux,cgo +//go:build linux && cgo package cmds diff --git a/pkg/cli/cmds/stage.go b/pkg/cli/cmds/stage.go index b00eee6c67..32193ca526 100644 --- a/pkg/cli/cmds/stage.go +++ b/pkg/cli/cmds/stage.go @@ -1,4 +1,4 @@ -// +build !no_stage +//go:build !no_stage package cmds diff --git a/pkg/containerd/none.go b/pkg/containerd/none.go index 44112ee5e7..8ef0712997 100644 --- a/pkg/containerd/none.go +++ b/pkg/containerd/none.go @@ -1,4 +1,4 @@ -// +build !ctrd +//go:build !ctrd package containerd diff --git a/pkg/containerd/utility_linux.go b/pkg/containerd/utility_linux.go index a6cae2e315..76ff569b41 100644 --- a/pkg/containerd/utility_linux.go +++ b/pkg/containerd/utility_linux.go @@ -1,4 +1,4 @@ -// +build linux +//go:build linux package containerd diff --git a/pkg/deploy/stage.go b/pkg/deploy/stage.go index 57339d3a98..4101ca2fd7 100644 --- a/pkg/deploy/stage.go +++ b/pkg/deploy/stage.go @@ -1,4 +1,4 @@ -// +build !no_stage +//go:build !no_stage package deploy diff --git a/pkg/flock/flock_unix.go b/pkg/flock/flock_unix.go index 5099b557e7..49b5465bce 100644 --- a/pkg/flock/flock_unix.go +++ b/pkg/flock/flock_unix.go @@ -1,4 +1,4 @@ -// +build linux darwin freebsd openbsd netbsd dragonfly +//go:build linux || darwin || freebsd || openbsd || netbsd || dragonfly /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/flock/flock_unix_test.go b/pkg/flock/flock_unix_test.go index 36a0643c04..a47015fa17 100644 --- a/pkg/flock/flock_unix_test.go +++ b/pkg/flock/flock_unix_test.go @@ -1,5 +1,4 @@ //go:build linux || darwin || freebsd || openbsd || netbsd || dragonfly -// +build linux darwin freebsd openbsd netbsd dragonfly /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/rootless/mounts.go b/pkg/rootless/mounts.go index 67fa1f3577..dc048675c0 100644 --- a/pkg/rootless/mounts.go +++ b/pkg/rootless/mounts.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows package rootless diff --git a/pkg/static/stage.go b/pkg/static/stage.go index 6e28aec39d..939e397ce0 100644 --- a/pkg/static/stage.go +++ b/pkg/static/stage.go @@ -1,4 +1,4 @@ -// +build !no_stage +//go:build !no_stage package static diff --git a/pkg/util/file.go b/pkg/util/file.go index 3622c7f41e..3ac0f20813 100644 --- a/pkg/util/file.go +++ b/pkg/util/file.go @@ -1,4 +1,4 @@ -// +build !windows +//go:build !windows package util