Skip to content

Commit 8671464

Browse files
authored
Merge pull request #911 from areebahmeddd/fix/false-lint
fix gosec g602 error for make validate-all
2 parents d27b34e + ea25e7f commit 8671464

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

pkg/logging/bracket_writer_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,12 @@ func TestBracketWriter_MultipleLines(t *testing.T) {
5353
}
5454

5555
expected := []string{"line one", "line two", "line three"}
56-
for i, line := range lines {
57-
matches := timestampRe.FindStringSubmatch(line)
56+
for i, want := range expected {
57+
matches := timestampRe.FindStringSubmatch(lines[i])
5858
if len(matches) != 3 {
59-
t.Errorf("line %d did not match format: %q", i, line)
60-
continue
61-
}
62-
if matches[2] != expected[i] {
63-
t.Errorf("line %d: expected %q, got %q", i, expected[i], matches[2])
59+
t.Errorf("line %d did not match format: %q", i, lines[i])
60+
} else if matches[2] != want {
61+
t.Errorf("line %d: expected %q, got %q", i, want, matches[2])
6462
}
6563
}
6664
}

0 commit comments

Comments
 (0)