Browse code

integration-cli: loadSpecialImage: fix shadowed variables (govet)

integration-cli/docker_utils_test.go:492:3: shadow: declaration of "line" shadows declaration at line 491 (govet)
line := strings.TrimSpace(line)
^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2024/11/06 04:25:31
Showing 1 changed files
... ...
@@ -489,7 +489,7 @@ func loadSpecialImage(c *testing.T, imageFunc specialimage.SpecialImageFunc) str
489 489
 	out := cli.DockerCmd(c, "load", "-i", imgTar).Stdout()
490 490
 
491 491
 	for _, line := range strings.Split(out, "\n") {
492
-		line := strings.TrimSpace(line)
492
+		line = strings.TrimSpace(line)
493 493
 
494 494
 		if _, imageID, hasID := strings.Cut(line, "Loaded image ID: "); hasID {
495 495
 			return imageID