Skip to content

Commit 566d24e

Browse files
author
Dudi Dolev
committed
WIP - fix lint
1 parent 59241f6 commit 566d24e

7 files changed

+10
-9
lines changed

exporter/currentop_collector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ package exporter
1717

1818
import (
1919
"context"
20+
"os"
2021
"strconv"
2122
"time"
22-
"os"
2323

2424
"github.com/pkg/errors"
2525
"github.com/prometheus/client_golang/prometheus"

exporter/diagnostic_data_collector.go

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package exporter
1818
import (
1919
"context"
2020
"os"
21+
2122
"github.com/pkg/errors"
2223
"github.com/prometheus/client_golang/prometheus"
2324
"github.com/sirupsen/logrus"

exporter/feature_compatibility_version_collector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package exporter
1818
import (
1919
"context"
2020
"fmt"
21-
"strconv"
2221
"os"
22+
"strconv"
2323

2424
"github.com/prometheus/client_golang/prometheus"
2525
"github.com/sirupsen/logrus"

exporter/replset_status_collector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
const (
2929
replicationNotEnabled = 76
3030
replicationNotYetInitialized = 94
31-
Unauthorized = 13
31+
Unauthorized = 13
3232
)
3333

3434
type replSetGetStatusCollector struct {

exporter/topology_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package exporter
1818
import (
1919
"context"
2020
"fmt"
21-
"sync"
2221
"os"
22+
"sync"
2323

2424
"github.com/pkg/errors"
2525
"github.com/sirupsen/logrus"

exporter/v1_compatibility.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
"context"
2020
"fmt"
2121
"math"
22+
"os"
2223
"strings"
2324
"time"
24-
"os"
2525

2626
"github.com/pkg/errors"
2727
"github.com/prometheus/client_golang/prometheus"
@@ -838,7 +838,7 @@ func retrieveMongoDBBuildInfo(ctx context.Context, client *mongo.Client, l *logr
838838
if err != nil {
839839
if e, ok := err.(mongo.CommandError); ok {
840840
if e.Code == Unauthorized {
841-
errors.Wrap(err,"unauthorized to run command buildInfo")
841+
errors.Wrap(err, "unauthorized to run command buildInfo")
842842
os.Exit(1)
843843
}
844844
}
@@ -1185,7 +1185,7 @@ func chunksBalancerRunning(ctx context.Context, client *mongo.Client) (prometheu
11851185
if err := res.Decode(&m); err != nil {
11861186
if e, ok := err.(mongo.CommandError); ok {
11871187
if e.Code == Unauthorized {
1188-
errors.Wrap(err,"unauthorized to run command balancerStatus")
1188+
errors.Wrap(err, "unauthorized to run command balancerStatus")
11891189
os.Exit(1)
11901190
}
11911191
}
@@ -1216,7 +1216,7 @@ func balancerEnabled(ctx context.Context, client *mongo.Client) (prometheus.Metr
12161216
if err != nil {
12171217
if e, ok := err.(mongo.CommandError); ok {
12181218
if e.Code == Unauthorized {
1219-
errors.Wrap(err,"unauthorized to run command balancerStatus")
1219+
errors.Wrap(err, "unauthorized to run command balancerStatus")
12201220
os.Exit(1)
12211221
}
12221222
}

internal/util/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131
ErrNotYetInitialized = int32(94)
3232
ErrNoReplicationEnabled = int32(76)
3333
ErrNotPrimaryOrSecondary = int32(13436)
34-
ErrNotUnauthorized = int32(13)
34+
ErrNotUnauthorized = int32(13)
3535
)
3636

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

0 commit comments

Comments
 (0)