mirror of https://github.com/docker/cli.git
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 <github@gone.nl>
This commit is contained in:
parent
79dc83e78b
commit
aafe3df8b3
|
@ -275,6 +275,7 @@ func TestExtractVariables(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
tc := tc
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
actual := ExtractVariables(tc.dict, defaultPattern)
|
actual := ExtractVariables(tc.dict, defaultPattern)
|
||||||
assert.Check(t, is.DeepEqual(actual, tc.expected))
|
assert.Check(t, is.DeepEqual(actual, tc.expected))
|
||||||
|
|
Loading…
Reference in New Issue