From cd3dca37b8f373cd137d4732cf614037d7828d9c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:07:20 +0100 Subject: [PATCH] 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 --- cli/manifest/store/store_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/manifest/store/store_test.go b/cli/manifest/store/store_test.go index ae56fea924..aa06afd35c 100644 --- a/cli/manifest/store/store_test.go +++ b/cli/manifest/store/store_test.go @@ -93,6 +93,7 @@ func TestStoreSaveAndGet(t *testing.T) { } for _, testcase := range testcases { + testcase := testcase t.Run(testcase.manifestRef.String(), func(t *testing.T) { actual, err := store.Get(testcase.listRef, testcase.manifestRef) if testcase.expectedErr != "" {