mirror of https://github.com/docker/cli.git
cli/command/trust: Using the variable on range scope `keyBytes` in function literal (scopelint)
```
cli/command/trust/key_load_test.go:121:27: Using the variable on range scope `keyID` in function literal (scopelint)
testLoadKeyFromPath(t, keyID, keyBytes)
^
cli/command/trust/key_load_test.go:176:32: Using the variable on range scope `keyBytes` in function literal (scopelint)
testLoadKeyTooPermissive(t, keyBytes)
^
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7c4b63b1c3
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bda413e0ae
commit
f7b23cf572
|
@ -117,6 +117,7 @@ var testKeys = map[string][]byte{
|
|||
func TestLoadKeyFromPath(t *testing.T) {
|
||||
skip.If(t, runtime.GOOS == "windows")
|
||||
for keyID, keyBytes := range testKeys {
|
||||
keyID, keyBytes := keyID, keyBytes
|
||||
t.Run(fmt.Sprintf("load-key-id-%s-from-path", keyID), func(t *testing.T) {
|
||||
testLoadKeyFromPath(t, keyID, keyBytes)
|
||||
})
|
||||
|
@ -172,6 +173,7 @@ func testLoadKeyFromPath(t *testing.T, privKeyID string, privKeyFixture []byte)
|
|||
func TestLoadKeyTooPermissive(t *testing.T) {
|
||||
skip.If(t, runtime.GOOS == "windows")
|
||||
for keyID, keyBytes := range testKeys {
|
||||
keyID, keyBytes := keyID, keyBytes
|
||||
t.Run(fmt.Sprintf("load-key-id-%s-too-permissive", keyID), func(t *testing.T) {
|
||||
testLoadKeyTooPermissive(t, keyBytes)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue