Skip to content

Commit 38bb712

Browse files
committed
copyloopvar to replace exportloopref
Signed-off-by: Sertac Ozercan <[email protected]>
1 parent ec5ea08 commit 38bb712

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

.golangci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ linters:
2020
disable-all: true
2121
enable:
2222
- errcheck
23+
- copyloopvar
2324
- forcetypeassert
2425
- gocritic
2526
- goconst

pkg/remover/remover_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ func TestRemoveImages(t *testing.T) {
3131
}
3232

3333
for k, tc := range cases {
34-
tc := tc
3534
t.Run(k, func(t *testing.T) {
3635
client := &testClient{t: t}
3736
added := make(map[string]struct{})

pkg/scanners/trivy/types_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ func TestCLIArgs(t *testing.T) {
151151
}
152152

153153
for _, tt := range tests {
154-
tt := tt
155154
t.Run(tt.desc, func(t *testing.T) {
156155
actual := tt.config.cliArgs(ref)
157156
if len(actual) != len(tt.expected) {

0 commit comments

Comments
 (0)