mirror of https://github.com/docker/cli.git
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 <github@gone.nl>
This commit is contained in:
parent
762b5a8df3
commit
046ac9714c
|
@ -47,7 +47,6 @@ func TestParseLogDetails(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
tc := tc
|
|
||||||
t.Run(tc.line, func(t *testing.T) {
|
t.Run(tc.line, func(t *testing.T) {
|
||||||
actual, err := ParseLogDetails(tc.line)
|
actual, err := ParseLogDetails(tc.line)
|
||||||
if tc.expectedErr != "" {
|
if tc.expectedErr != "" {
|
||||||
|
|
Loading…
Reference in New Issue