mirror of https://github.com/docker/cli.git
templates: Using the variable on range scope `testCase` in function literal (scopelint)
```
templates/templates_test.go:74:29: Using the variable on range scope `testCase` in function literal (scopelint)
assert.Check(t, is.Equal(testCase.expected, b.String()))
^
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 54d48de216
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a087595fb6
commit
ae7b1f737b
|
@ -65,6 +65,8 @@ func TestParseTruncateFunction(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, testCase := range testCases {
|
for _, testCase := range testCases {
|
||||||
|
testCase := testCase
|
||||||
|
|
||||||
tm, err := Parse(testCase.template)
|
tm, err := Parse(testCase.template)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue