Bumping golangci-lint to v1.59.1 (#6817)

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This commit is contained in:
Johan Fylling
2024-06-19 15:13:43 +02:00
committed by GitHub
parent 8e7172c8f8
commit 5464b005e8
121 changed files with 316 additions and 313 deletions
+1 -1
View File
@@ -690,7 +690,7 @@ func (ap *clientTLSAuthPlugin) NewClient(c Config) (*http.Client, error) {
return client, nil
}
func (ap *clientTLSAuthPlugin) Prepare(req *http.Request) error {
func (ap *clientTLSAuthPlugin) Prepare(_ *http.Request) error {
return nil
}
+1 -1
View File
@@ -14,7 +14,7 @@ import (
func TestGCPMetadataAuthPlugin(t *testing.T) {
idToken := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.Et9HFtf9R3GEMA0IICOfFMVXY7kkTX1wr4qCyhIf58U"
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
s := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {}))
defer s.Close()
ts := httptest.NewServer(http.Handler(&gcpMetadataHandler{idToken}))
+6 -6
View File
@@ -922,7 +922,7 @@ func TestDoWithDistributedTracingOpts(t *testing.T) {
tracing.RegisterHTTPTracing(&mock)
body := "Some Bad Request was received"
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintln(w, body)
}))
@@ -957,7 +957,7 @@ func TestDoWithResponseInClientLog(t *testing.T) {
ctx := context.Background()
body := "Some Bad Request was received"
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintln(w, body)
}))
@@ -991,7 +991,7 @@ func TestDoWithResponseInClientLog(t *testing.T) {
func TestDoWithTruncatedResponseInClientLog(t *testing.T) {
ctx := context.Background()
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintln(w, strings.Repeat("Some Bad Request was received", 50))
}))
@@ -1492,7 +1492,7 @@ func TestOauth2ClientCredentials(t *testing.T) {
defer tc.ots.stop()
if tc.options == nil {
tc.options = func(c *Config) {}
tc.options = func(_ *Config) {}
}
client := newOauth2TestClient(t, tc.ts, tc.ots, tc.options)
@@ -1767,7 +1767,7 @@ func TestS3SigningInstantiationInitializesLogger(t *testing.T) {
authPlugin := &awsSigningAuthPlugin{
AWSEnvironmentCredentials: &awsEnvironmentCredentialService{},
}
client, err := New([]byte(config), map[string]*keys.Config{}, AuthPluginLookup(func(name string) HTTPAuthPlugin {
client, err := New([]byte(config), map[string]*keys.Config{}, AuthPluginLookup(func(_ string) HTTPAuthPlugin {
return authPlugin
}))
if err != nil {
@@ -2447,7 +2447,7 @@ func getTestServerWithTimeout(d time.Duration) (baseURL string, teardownFn func(
mux := http.NewServeMux()
ts := httptest.NewServer(mux)
mux.HandleFunc("/v1/test", func(w http.ResponseWriter, req *http.Request) {
mux.HandleFunc("/v1/test", func(w http.ResponseWriter, _ *http.Request) {
time.Sleep(d * time.Second)
w.WriteHeader(http.StatusOK)
})