Skip to content

Commit

Permalink
cli-plugins/manager: remove redundant capturing of loop vars (copyloo…
Browse files Browse the repository at this point in the history
…pvar)

go1.22 and up now produce a unique variable in loops, tehrefore no longer
requiring to capture the variable manually;

    cli-plugins/manager/cobra.go:55:4: The copy of the 'for' variable "p" can be deleted (Go 1.22+) (copyloopvar)
                p := p
                ^

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Nov 5, 2024
1 parent 32b40de commit d77760f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cli-plugins/manager/cobra.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func AddPluginCommandStubs(dockerCli command.Cli, rootCmd *cobra.Command) (err e
return
}
for _, p := range plugins {
p := p
vendor := p.Vendor
if vendor == "" {
vendor = "unknown"
Expand Down

0 comments on commit d77760f

Please sign in to comment.