From a269e17d726e92a0d85171f55b1af0db5606ad89 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 13:40:25 +0100 Subject: [PATCH] cli/command/context: Using the variable on range scope `c` in function literal (scopelint) ``` cli/command/context/create_test.go:270:31: Using the variable on range scope `c` in function literal (scopelint) Name: c.name, ^ cli/command/context/create_test.go:271:31: Using the variable on range scope `c` in function literal (scopelint) Description: c.description, ^ cli/command/context/create_test.go:272:31: Using the variable on range scope `c` in function literal (scopelint) DefaultStackOrchestrator: c.orchestrator, cli/command/context/create_test.go:346:31: Using the variable on range scope `c` in function literal (scopelint) Name: c.name, ^ cli/command/context/create_test.go:347:31: Using the variable on range scope `c` in function literal (scopelint) Description: c.description, ^ cli/command/context/create_test.go:348:31: Using the variable on range scope `c` in function literal (scopelint) DefaultStackOrchestrator: c.orchestrator, ^ ``` Signed-off-by: Sebastiaan van Stijn --- cli/command/context/create_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/command/context/create_test.go b/cli/command/context/create_test.go index 013e82d05e..99af79e5e3 100644 --- a/cli/command/context/create_test.go +++ b/cli/command/context/create_test.go @@ -263,6 +263,7 @@ func TestCreateFromContext(t *testing.T) { cli.SetCurrentContext("dummy") for _, c := range cases { + c := c t.Run(c.name, func(t *testing.T) { cli.ResetOutputBuffers() err := RunCreate(cli, &CreateOptions{ @@ -339,6 +340,7 @@ func TestCreateFromCurrent(t *testing.T) { cli.SetCurrentContext("original") for _, c := range cases { + c := c t.Run(c.name, func(t *testing.T) { cli.ResetOutputBuffers() err := RunCreate(cli, &CreateOptions{