chore(lint): add new linters and update codebase
- add canonicalheader - add copyloopvar - add fatcontext - add intrange
This commit is contained in:
@@ -25,7 +25,6 @@ func Test_checkRequest(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -88,7 +87,6 @@ func Test_checkResponse(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -146,7 +144,6 @@ func Test_checkResultCode(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ func Test_Client_ExternalAddress(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@ func Test_Client_AddPortMapping(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ func (c *Client) rpc(ctx context.Context, gateway netip.Addr,
|
||||
|
||||
var retryCount uint
|
||||
var failedAttempts []string
|
||||
for retryCount = 0; retryCount < c.maxRetries; retryCount++ {
|
||||
for retryCount = 0; retryCount < c.maxRetries; retryCount++ { //nolint:intrange
|
||||
deadline := time.Now().Add(connectionDuration)
|
||||
err = connection.SetDeadline(deadline)
|
||||
if err != nil {
|
||||
|
||||
@@ -138,7 +138,6 @@ func Test_Client_rpc(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -193,7 +192,6 @@ func Test_dedupFailedAttempts(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, testCase := range testCases {
|
||||
testCase := testCase
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user