diff --git a/hack/tools.mk b/hack/tools.mk index 0181ec50..294c890e 100644 --- a/hack/tools.mk +++ b/hack/tools.mk @@ -8,14 +8,11 @@ GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint GO_ADD_LICENSE := $(TOOLS_BIN_DIR)/addlicense # default tool versions -GOLANGCI_LINT_VERSION ?= v1.51.2 +GOLANGCI_LINT_VERSION ?= v1.61.0 GO_ADD_LICENSE_VERSION ?= latest export TOOLS_BIN_DIR := $(TOOLS_BIN_DIR) export PATH := $(abspath $(TOOLS_BIN_DIR)):$(PATH) -$(info "TOOLS_BIN_DIR from tools.mk", $(TOOLS_BIN_DIR)) -$(info "TOOLS_DIR from tools.mk", $(TOOLS_DIR)) -$(info "PATH from tools.mk", $(PATH)) ######################################### # Tools # diff --git a/internal/app/fakes.go b/internal/app/fakes.go index 0f33e29b..09649f83 100644 --- a/internal/app/fakes.go +++ b/internal/app/fakes.go @@ -14,31 +14,31 @@ import ( type EtcdFakeKV struct{} // Get gets a value for a given key. -func (c *EtcdFakeKV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) { +func (c *EtcdFakeKV) Get(_ context.Context, _ string, _ ...clientv3.OpOption) (*clientv3.GetResponse, error) { return nil, nil } // Put puts a value for a given key. -func (c *EtcdFakeKV) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) { +func (c *EtcdFakeKV) Put(_ context.Context, _, _ string, _ ...clientv3.OpOption) (*clientv3.PutResponse, error) { return nil, nil } // Delete deletes an entry with a given key. -func (c *EtcdFakeKV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) { +func (c *EtcdFakeKV) Delete(_ context.Context, _ string, _ ...clientv3.OpOption) (*clientv3.DeleteResponse, error) { return nil, nil } // Compact compacts etcd KV history before the given rev. -func (c *EtcdFakeKV) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error) { +func (c *EtcdFakeKV) Compact(_ context.Context, _ int64, _ ...clientv3.CompactOption) (*clientv3.CompactResponse, error) { return nil, nil } // Txn creates a transaction. -func (c *EtcdFakeKV) Txn(ctx context.Context) clientv3.Txn { +func (c *EtcdFakeKV) Txn(_ context.Context) clientv3.Txn { return nil } // Do applies a single Op on KV without a transaction. -func (c *EtcdFakeKV) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error) { +func (c *EtcdFakeKV) Do(_ context.Context, _ clientv3.Op) (clientv3.OpResponse, error) { return clientv3.OpResponse{}, nil } diff --git a/internal/bootstrap/bootstrap_test.go b/internal/bootstrap/bootstrap_test.go index 1619f0a9..0a343020 100644 --- a/internal/bootstrap/bootstrap_test.go +++ b/internal/bootstrap/bootstrap_test.go @@ -227,7 +227,7 @@ func deleteTestDir(t *testing.T, testDir string) { func getTestHttpClient(responseCode int, responseBody []byte) *http.Client { return &http.Client{ - Transport: TestRoundTripper(func(req *http.Request) *http.Response { + Transport: TestRoundTripper(func(_ *http.Request) *http.Response { var contentLen int64 if responseBody != nil { contentLen = int64(len(responseBody)) diff --git a/internal/brclient/brclient_test.go b/internal/brclient/brclient_test.go index 5931a32f..2deac3d2 100644 --- a/internal/brclient/brclient_test.go +++ b/internal/brclient/brclient_test.go @@ -204,7 +204,7 @@ func TestNewDefaultClient(t *testing.T) { func getTestHttpClient(responseCode int, responseBody []byte) *http.Client { return &http.Client{ - Transport: TestRoundTripper(func(req *http.Request) *http.Response { + Transport: TestRoundTripper(func(_ *http.Request) *http.Response { var contentLen int64 if responseBody != nil { contentLen = int64(len(responseBody)) diff --git a/internal/util/retry_test.go b/internal/util/retry_test.go index ad73b0c4..08cc2994 100644 --- a/internal/util/retry_test.go +++ b/internal/util/retry_test.go @@ -44,7 +44,7 @@ func TestErrorIfExceedsAttempts(t *testing.T) { for _, entry := range table { g := NewWithT(t) logger := zaptest.NewLogger(t) - t.Run(entry.description, func(t *testing.T) { + t.Run(entry.description, func(_ *testing.T) { defer clearRetryResults() result := Retry(context.Background(), logger, operation, neverSucceeds, numAttempts, backOff, entry.canRetryFn) g.Expect(result.Value).To(Equal(attemptFailed))