From 046ac9714c7c0cf5adb5da8a9ca5aa25e2343bab Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 5 Nov 2024 10:00:55 +0100 Subject: [PATCH] service: remove redundant capturing of loop vars in tests (copyloopvar) go1.22 and up now produce a unique variable in loops, tehrefore no longer requiring to capture the variable manually; service/logs/parse_logs_test.go:50:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar) tc := tc ^ Signed-off-by: Sebastiaan van Stijn --- service/logs/parse_logs_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/service/logs/parse_logs_test.go b/service/logs/parse_logs_test.go index 9f6abdf714..5226409fef 100644 --- a/service/logs/parse_logs_test.go +++ b/service/logs/parse_logs_test.go @@ -47,7 +47,6 @@ func TestParseLogDetails(t *testing.T) { }, } for _, tc := range testCases { - tc := tc t.Run(tc.line, func(t *testing.T) { actual, err := ParseLogDetails(tc.line) if tc.expectedErr != "" {