Skip to content

Commit

Permalink
PMM-9870 fix linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Nov 11, 2024
1 parent e2c19fb commit 588c970
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func makeExcludeFilter(exclude []string) *primitive.E {
if len(exclude) == 0 {
return nil
}
var filterExpressions []bson.D
filterExpressions := make([]bson.D, 0, len(exclude))
for _, dbname := range exclude {
filterExpressions = append(filterExpressions,
bson.D{{Key: "name", Value: bson.D{{Key: "$ne", Value: dbname}}}},
Expand All @@ -117,12 +117,12 @@ func makeExcludeFilter(exclude []string) *primitive.E {
}

func makeDBsFilter(filterInNamespaces []string) *primitive.E {
filterExpressions := []bson.D{}

nss := removeEmptyStrings(filterInNamespaces)
if len(nss) == 0 {
return nil
}
filterExpressions := make([]bson.D, 0, len(nss))
for _, namespace := range nss {
parts := strings.Split(namespace, ".")
filterExpressions = append(filterExpressions,
Expand Down

0 comments on commit 588c970

Please sign in to comment.