From 4a71ce02e6ea338c50a8de9ba532a88ce8352dee Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 5 Nov 2024 10:03:48 +0100 Subject: [PATCH] cli/command/image: 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/image/tree.go:59:4: The copy of the 'for' variable "im" can be deleted (Go 1.22+) (copyloopvar) im := im ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/image/tree.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index ec4ef7b4e4..ac6b209ead 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -56,7 +56,6 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error continue } - im := im sub := subImage{ Platform: platforms.Format(im.ImageData.Platform), Available: im.Available,