From 54d48de2163e9b1898c3631116836402512b7955 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 13:35:54 +0100 Subject: [PATCH] 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 --- templates/templates_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/templates_test.go b/templates/templates_test.go index 102de2bd9f..3a007e7b9a 100644 --- a/templates/templates_test.go +++ b/templates/templates_test.go @@ -65,6 +65,8 @@ func TestParseTruncateFunction(t *testing.T) { } for _, testCase := range testCases { + testCase := testCase + tm, err := Parse(testCase.template) assert.NilError(t, err)