Skip to content

Commit

Permalink
fix loop variable captured by func literal
Browse files Browse the repository at this point in the history
  • Loading branch information
stefans-elastic committed Jan 17, 2025
1 parent a56948c commit 48fe367
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metricbeat/module/mongodb/collstats/collstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func (m *Metricset) Fetch(reporter mb.ReporterV2) error {
collStatsErrGroup.SetLimit(10) // limit number of goroutines running at the same time

for group, info := range totals {
group := group // make sure it works properly on older Go versions

if group == "note" {
continue
}
Expand Down

0 comments on commit 48fe367

Please sign in to comment.