mirror of https://github.com/docker/cli.git
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 <github@gone.nl>
This commit is contained in:
parent
e74e2c7741
commit
5a2a9d9ca8
|
@ -586,6 +586,7 @@ func TestConfigPath(t *testing.T) {
|
||||||
expectedErr: fmt.Sprintf("is outside of root config directory %q", "dummy"),
|
expectedErr: fmt.Sprintf("is outside of root config directory %q", "dummy"),
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
|
tc := tc
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
SetDir(tc.dir)
|
SetDir(tc.dir)
|
||||||
f, err := Path(tc.path...)
|
f, err := Path(tc.path...)
|
||||||
|
|
Loading…
Reference in New Issue