From 5a2a9d9ca8d8ee55f3a6054c7456e346114c78c5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 13:33:25 +0100 Subject: [PATCH] cli/config: Using the variable on range scope `tc` in function literal (scopelint) ``` cli/config/config_test.go:590:11: Using the variable on range scope `tc` in function literal (scopelint) SetDir(tc.dir) ^ cli/config/config_test.go:591:19: Using the variable on range scope `tc` in function literal (scopelint) f, err := Path(tc.path...) ^ cli/config/config_test.go:592:23: Using the variable on range scope `tc` in function literal (scopelint) assert.Equal(t, f, tc.expected) ^ ``` Signed-off-by: Sebastiaan van Stijn --- cli/config/config_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/config/config_test.go b/cli/config/config_test.go index dc46604f11..639829555c 100644 --- a/cli/config/config_test.go +++ b/cli/config/config_test.go @@ -586,6 +586,7 @@ func TestConfigPath(t *testing.T) { expectedErr: fmt.Sprintf("is outside of root config directory %q", "dummy"), }, } { + tc := tc t.Run(tc.name, func(t *testing.T) { SetDir(tc.dir) f, err := Path(tc.path...)