From 0d9e74dfa7e5bf51491fe8de24d5a2c2e66c181c Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Sun, 3 May 2026 09:01:03 -0600 Subject: [PATCH] style: fix lint issues in authorizer_test.go Use range-over-int for loops and rename unused parameters to _. Signed-off-by: Terry Howe --- pkg/registry/authorizer_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/registry/authorizer_test.go b/pkg/registry/authorizer_test.go index 803317e93..db02428c5 100644 --- a/pkg/registry/authorizer_test.go +++ b/pkg/registry/authorizer_test.go @@ -261,10 +261,10 @@ func TestAuthorizer_ConcurrentAccess(t *testing.T) { var wg sync.WaitGroup wg.Add(numGoroutines * 2) - for i := 0; i < numGoroutines; i++ { + for range numGoroutines { go func() { defer wg.Done() - for j := 0; j < numRequests; j++ { + for range numRequests { req, err := http.NewRequest(http.MethodGet, server.URL, nil) if err != nil { t.Errorf("failed to create request: %v", err) @@ -281,7 +281,7 @@ func TestAuthorizer_ConcurrentAccess(t *testing.T) { go func() { defer wg.Done() - for j := 0; j < numRequests; j++ { + for range numRequests { authorizer.setAttemptBearerAuthentication(true) val := authorizer.getAttemptBearerAuthentication() if val != true { @@ -309,7 +309,7 @@ func TestAuthorizer_Do_RetriesOn401(t *testing.T) { var mu sync.Mutex callCount := 0 - transport := roundTripFunc(func(req *http.Request) (*http.Response, error) { + transport := roundTripFunc(func(_ *http.Request) (*http.Response, error) { mu.Lock() n := callCount callCount++ @@ -343,7 +343,7 @@ func TestAuthorizer_Do_NoRetryOn404(t *testing.T) { var mu sync.Mutex callCount := 0 - transport := roundTripFunc(func(req *http.Request) (*http.Response, error) { + transport := roundTripFunc(func(_ *http.Request) (*http.Response, error) { mu.Lock() callCount++ mu.Unlock()