From e70edc35768bb17d7b2db04e38a148bd0835c267 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:44:09 +0100 Subject: [PATCH] cli/command/stack/kubernetes: Using the variable on range scope `c` in function literal (scopelint) ``` cli/command/stack/kubernetes/convert_test.go:199:35: Using the variable on range scope `c` in function literal (scopelint) conv, err := NewStackConverter(c.version) ^ ``` Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 640305f33c460aae129f1a20bf3f4d7d7865414e) Signed-off-by: Sebastiaan van Stijn --- cli/command/stack/kubernetes/convert_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/command/stack/kubernetes/convert_test.go b/cli/command/stack/kubernetes/convert_test.go index 1cdf4f276b..05d1748e55 100644 --- a/cli/command/stack/kubernetes/convert_test.go +++ b/cli/command/stack/kubernetes/convert_test.go @@ -195,6 +195,7 @@ func TestHandlePullSecret(t *testing.T) { } for _, c := range cases { + c := c t.Run(c.version, func(t *testing.T) { conv, err := NewStackConverter(c.version) assert.NilError(t, err) @@ -222,6 +223,7 @@ func TestHandlePullPolicy(t *testing.T) { } for _, c := range cases { + c := c t.Run(c.version, func(t *testing.T) { conv, err := NewStackConverter(c.version) assert.NilError(t, err) @@ -271,6 +273,7 @@ func TestHandleInternalServiceType(t *testing.T) { }, } for _, c := range cases { + c := c t.Run(c.name, func(t *testing.T) { res, err := fromComposeServiceConfig(composetypes.ServiceConfig{ Name: "test",