Skip to content

Commit

Permalink
remove map init in init
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-pawel committed Oct 15, 2024
1 parent 22c8781 commit 2daf743
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/outputs/mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,5 @@ func (s *MongoDB) Write(metrics []telegraf.Metric) error {
}

func init() {
outputs.Add("mongodb", func() telegraf.Output {
return &MongoDB{
collections: make(map[string]bson.M),
}
})
outputs.Add("mongodb", func() telegraf.Output { return &MongoDB{} })
}

0 comments on commit 2daf743

Please sign in to comment.