From aafe3df8b394a9fd5abab5eff48c125c4521f13a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:05:56 +0100 Subject: [PATCH] cli/compose/template: Using the variable on range scope `tc` in function literal (scopelint) ``` cli/compose/template/template_test.go:279:31: Using the variable on range scope `tc` in function literal (scopelint) actual := ExtractVariables(tc.dict, defaultPattern) ^ cli/compose/template/template_test.go:280:41: Using the variable on range scope `tc` in function literal (scopelint) assert.Check(t, is.DeepEqual(actual, tc.expected)) ^ ``` Signed-off-by: Sebastiaan van Stijn --- cli/compose/template/template_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/compose/template/template_test.go b/cli/compose/template/template_test.go index ce3690410f..b1610009bb 100644 --- a/cli/compose/template/template_test.go +++ b/cli/compose/template/template_test.go @@ -275,6 +275,7 @@ func TestExtractVariables(t *testing.T) { }, } for _, tc := range testCases { + tc := tc t.Run(tc.name, func(t *testing.T) { actual := ExtractVariables(tc.dict, defaultPattern) assert.Check(t, is.DeepEqual(actual, tc.expected))