diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 45a1c84f..3697691a 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -15,7 +15,7 @@ RUN export K8S_VERSION=1.24.2 && \ tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz ## install golangci -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1 ENV GO111MODULE on ENV DAPPER_ENV REPO TAG DRONE_TAG diff --git a/main.go b/main.go index e66f8fdd..b7b17af0 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,7 @@ func main() { }, } - app.Action = func(c *cli.Context) error { + app.Action = func(_ *cli.Context) error { return run(kubeConfig) } diff --git a/pkg/deviceplugins/common.go b/pkg/deviceplugins/common.go index a1af915b..310eb137 100644 --- a/pkg/deviceplugins/common.go +++ b/pkg/deviceplugins/common.go @@ -134,7 +134,7 @@ func gRPCConnect(existingCtx context.Context, socketPath string, timeout time.Du c, err := grpc.DialContext(ctx, socketPath, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), - grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) { + grpc.WithContextDialer(func(_ context.Context, addr string) (net.Conn, error) { return net.DialTimeout("unix", addr, timeout) }), ) diff --git a/pkg/webhook/server.go b/pkg/webhook/server.go index 6402413c..7592ce76 100644 --- a/pkg/webhook/server.go +++ b/pkg/webhook/server.go @@ -89,7 +89,7 @@ func (s *AdmissionWebhookServer) ListenAndServe() error { func (s *AdmissionWebhookServer) listenAndServe(clients *Clients, handler http.Handler, mutationResources []types.Resource, validationResources []types.Resource) error { apply := clients.Clients.Apply.WithDynamicLookup() - clients.Clients.Core.Secret().OnChange(s.context, "secrets", func(key string, secret *corev1.Secret) (*corev1.Secret, error) { + clients.Clients.Core.Secret().OnChange(s.context, "secrets", func(_ string, secret *corev1.Secret) (*corev1.Secret, error) { if secret == nil || secret.Name != caName || secret.Namespace != namespace || len(secret.Data[corev1.TLSCertKey]) == 0 { return nil, nil }