Skip to content

Commit

Permalink
volume/local: remove redundant capturing of loop vars (copyloopvar)
Browse files Browse the repository at this point in the history
    volume/local/local_linux_test.go:232:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
            tc := tc
            ^
    volume/local/local_linux_test.go:316: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>
  • Loading branch information
thaJeztah committed Nov 12, 2024
1 parent f7b547b commit 67d91e7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions volume/local/local_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ func TestVolCreateValidation(t *testing.T) {
}

for i, tc := range tests {
tc := tc
t.Run(tc.doc, func(t *testing.T) {
if tc.name == "" {
tc.name = "vol-" + strconv.Itoa(i)
Expand Down Expand Up @@ -313,7 +312,6 @@ func TestVolMountOpts(t *testing.T) {
}

for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
dev, opts, err := getMountOptions(&tc.opts, resolveIP)

Expand Down

0 comments on commit 67d91e7

Please sign in to comment.