From ced82d68c0bfdad89208b1fc1633979753ab70a7 Mon Sep 17 00:00:00 2001 From: Dan Holmes Date: Wed, 20 Mar 2024 11:38:42 -0500 Subject: [PATCH] style(golangci-lint): ignore perfsprint check for consistancy. Minor argument clarification. Changes recommended by latest versions of golangci-lint --- .golangci.yml | 1 + pkg/ohdear/client.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 5f76ae2..5cac734 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,6 +19,7 @@ linters: - sqlclosecheck - maligned - wrapcheck + - perfsprint issues: exclude-rules: diff --git a/pkg/ohdear/client.go b/pkg/ohdear/client.go index cbc11c7..d43eefb 100644 --- a/pkg/ohdear/client.go +++ b/pkg/ohdear/client.go @@ -25,7 +25,7 @@ func NewClient(baseURL, token string) *Client { client.SetRetryCount(3) client.SetRetryWaitTime(5 * time.Second) client.SetRetryMaxWaitTime(20 * time.Second) - client.AddRetryCondition(func(r *resty.Response, err error) bool { + client.AddRetryCondition(func(r *resty.Response, _ error) bool { return r.StatusCode() == http.StatusTooManyRequests })