Skip to content

Commit 9e89e8b

Browse files
committed
satisfy linter
1 parent 01afaa9 commit 9e89e8b

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

exporter/exporter.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ func (e *Exporter) makeRegistry(ctx context.Context, client *mongo.Client, topol
231231
}
232232

233233
if e.opts.EnableTopMetrics && nodeType != typeMongos && limitsOk && requestOpts.EnableTopMetrics {
234-
tc := newTopCollector(ctx, client, e.opts.Logger,
235-
e.opts.CompatibleMode, topologyInfo)
234+
tc := newTopCollector(ctx, client, e.opts.Logger, topologyInfo)
236235
registry.MustRegister(tc)
237236
}
238237

exporter/seedlist.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package exporter
1717

1818
import (
19-
"fmt"
2019
"log"
2120
"log/slog"
2221
"net"
@@ -29,7 +28,7 @@ import (
2928
func GetSeedListFromSRV(uri string, logger *slog.Logger) string {
3029
uriParsed, err := url.Parse(uri)
3130
if err != nil {
32-
log.Fatal(fmt.Sprintf("Failed to parse URI %s: %v", uri, err))
31+
log.Fatalf("Failed to parse URI %s: %v", uri, err)
3332
}
3433

3534
cname, srvRecords, err := net.LookupSRV("mongodb", "tcp", uriParsed.Hostname())

exporter/top_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type topCollector struct {
3636

3737
var ErrInvalidOrMissingTotalsEntry = fmt.Errorf("invalid or misssing totals entry in top results")
3838

39-
func newTopCollector(ctx context.Context, client *mongo.Client, logger *slog.Logger, compatible bool,
39+
func newTopCollector(ctx context.Context, client *mongo.Client, logger *slog.Logger,
4040
topology labelsGetter,
4141
) *topCollector {
4242
return &topCollector{

exporter/top_collector_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestTopCollector(t *testing.T) {
3535

3636
ti := labelsGetterMock{}
3737

38-
c := newTopCollector(ctx, client, promslog.New(&promslog.Config{}), false, ti)
38+
c := newTopCollector(ctx, client, promslog.New(&promslog.Config{}), ti)
3939

4040
// Filter metrics for 2 reasons:
4141
// 1. The result is huge

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func parseURIList(uriList []string, logger *slog.Logger, splitCluster bool) []st
256256
for _, hosturl := range URIs {
257257
urlParsed, err := url.Parse(hosturl)
258258
if err != nil {
259-
log.Fatal(fmt.Sprintf("Failed to parse URI %s: %v", hosturl, err))
259+
log.Fatalf("Failed to parse URI %s: %v", hosturl, err)
260260
}
261261
for _, host := range strings.Split(urlParsed.Host, ",") {
262262
targetURI := "mongodb://"

0 commit comments

Comments
 (0)