From 78a7e15032cc8afeed0621ac537e555f0357f337 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 5 Nov 2024 10:05:04 +0100 Subject: [PATCH] cli/command/container: remove redundant capturing of loop vars (copyloopvar) go1.22 and up now produce a unique variable in loops, tehrefore no longer requiring to capture the variable manually; cli/command/container/opts.go:765:3: The copy of the 'for' variable "n" can be deleted (Go 1.22+) (copyloopvar) n := n ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/container/opts.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index 381319b19c..fb58567ee1 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -762,7 +762,6 @@ func parseNetworkOpts(copts *containerOptions) (map[string]*networktypes.Endpoin } for i, n := range copts.netMode.Value() { - n := n if container.NetworkMode(n.Target).IsUserDefined() { hasUserDefined = true } else {