From 267b8ff3a97c456376e6213de8b6c32b3ce39a91 Mon Sep 17 00:00:00 2001 From: ghosind Date: Mon, 22 Jul 2024 21:58:17 +0800 Subject: [PATCH] lint: remove tautological condition. --- request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request.go b/request.go index 8f88be8..001825b 100644 --- a/request.go +++ b/request.go @@ -92,7 +92,7 @@ func (cli *Client) sendRequest(req *http.Request, opt RequestOptions) (*http.Res attempt++ resp, err := httpClient.Do(req) - if err == nil || (err != nil && attempt >= maxAttempt) { + if err == nil || attempt >= maxAttempt { return resp, err } else if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { return resp, err