pkg/plugins/client_test.go:108:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
pkg/plugins/client_test.go:132:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -105,7 +105,6 @@ func TestBackoff(t *testing.T) {
|
| 105 | 105 |
} |
| 106 | 106 |
|
| 107 | 107 |
for _, tc := range cases {
|
| 108 |
- tc := tc |
|
| 109 | 108 |
t.Run(fmt.Sprintf("retries: %v", tc.retries), func(t *testing.T) {
|
| 110 | 109 |
s := tc.expTimeOff * time.Second |
| 111 | 110 |
if d := backoff(tc.retries); d != s {
|
| ... | ... |
@@ -129,7 +128,6 @@ func TestAbortRetry(t *testing.T) {
|
| 129 | 129 |
} |
| 130 | 130 |
|
| 131 | 131 |
for _, tc := range cases {
|
| 132 |
- tc := tc |
|
| 133 | 132 |
t.Run(fmt.Sprintf("duration: %v", tc.timeOff), func(t *testing.T) {
|
| 134 | 133 |
s := tc.timeOff * time.Second |
| 135 | 134 |
if a := abort(time.Now(), s, 0); a != tc.expAbort {
|