Skip to content

Commit

Permalink
fix(linter): G601 prevent implicit memory aliasing in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Apr 4, 2024
1 parent c762b49 commit aa7702e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metricbeat/mb/module/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func TestProcessorsForConfig(t *testing.T) {
t.Errorf("[%s] %v", description, err)
continue
}
processedEvent, err := processors.Run(&test.event)
testEvent := testCases[description].event
processedEvent, err := processors.Run(&testEvent)
// We don't check if err != nil, because we are testing the final outcome
// of running the processors, including when some of them fail.
if processedEvent == nil {
Expand Down

0 comments on commit aa7702e

Please sign in to comment.