Skip to content

Commit

Permalink
WIP - fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudi Dolev committed Jan 20, 2025
1 parent 59241f6 commit 566d24e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion exporter/currentop_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package exporter

import (
"context"
"os"
"strconv"
"time"
"os"

"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
Expand Down
1 change: 1 addition & 0 deletions exporter/diagnostic_data_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package exporter
import (
"context"
"os"

"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion exporter/feature_compatibility_version_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package exporter
import (
"context"
"fmt"
"strconv"
"os"
"strconv"

"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion exporter/replset_status_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
const (
replicationNotEnabled = 76
replicationNotYetInitialized = 94
Unauthorized = 13
Unauthorized = 13
)

type replSetGetStatusCollector struct {
Expand Down
2 changes: 1 addition & 1 deletion exporter/topology_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package exporter
import (
"context"
"fmt"
"sync"
"os"
"sync"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand Down
8 changes: 4 additions & 4 deletions exporter/v1_compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"context"
"fmt"
"math"
"os"
"strings"
"time"
"os"

"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -838,7 +838,7 @@ func retrieveMongoDBBuildInfo(ctx context.Context, client *mongo.Client, l *logr
if err != nil {
if e, ok := err.(mongo.CommandError); ok {
if e.Code == Unauthorized {
errors.Wrap(err,"unauthorized to run command buildInfo")
errors.Wrap(err, "unauthorized to run command buildInfo")
os.Exit(1)
}
}
Expand Down Expand Up @@ -1185,7 +1185,7 @@ func chunksBalancerRunning(ctx context.Context, client *mongo.Client) (prometheu
if err := res.Decode(&m); err != nil {
if e, ok := err.(mongo.CommandError); ok {
if e.Code == Unauthorized {
errors.Wrap(err,"unauthorized to run command balancerStatus")
errors.Wrap(err, "unauthorized to run command balancerStatus")
os.Exit(1)
}
}
Expand Down Expand Up @@ -1216,7 +1216,7 @@ func balancerEnabled(ctx context.Context, client *mongo.Client) (prometheus.Metr
if err != nil {
if e, ok := err.(mongo.CommandError); ok {
if e.Code == Unauthorized {
errors.Wrap(err,"unauthorized to run command balancerStatus")
errors.Wrap(err, "unauthorized to run command balancerStatus")
os.Exit(1)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
ErrNotYetInitialized = int32(94)
ErrNoReplicationEnabled = int32(76)
ErrNotPrimaryOrSecondary = int32(13436)
ErrNotUnauthorized = int32(13)
ErrNotUnauthorized = int32(13)
)

// MyState returns the replica set and the instance's state if available.
Expand Down

0 comments on commit 566d24e

Please sign in to comment.