cli/manifest: Using the variable on range scope `testcase` in function literal (scopelint)

```
cli/manifest/store/store_test.go:97:29: Using the variable on range scope `testcase` in function literal (scopelint)
			actual, err := store.Get(testcase.listRef, testcase.manifestRef)
			                         ^
cli/manifest/store/store_test.go:98:7: Using the variable on range scope `testcase` in function literal (scopelint)
			if testcase.expectedErr != "" {
			   ^
cli/manifest/store/store_test.go:99:26: Using the variable on range scope `testcase` in function literal (scopelint)
				assert.Error(t, err, testcase.expectedErr)
				                     ^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit cd3dca37b8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-29 14:07:20 +01:00
parent fccc105d4d
commit 1b35214c11
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ func TestStoreSaveAndGet(t *testing.T) {
} }
for _, testcase := range testcases { for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.manifestRef.String(), func(t *testing.T) { t.Run(testcase.manifestRef.String(), func(t *testing.T) {
actual, err := store.Get(testcase.listRef, testcase.manifestRef) actual, err := store.Get(testcase.listRef, testcase.manifestRef)
if testcase.expectedErr != "" { if testcase.expectedErr != "" {