File tree Expand file tree Collapse file tree 6 files changed +26
-23
lines changed Expand file tree Collapse file tree 6 files changed +26
-23
lines changed Original file line number Diff line number Diff line change 4
4
max-issues-per-linter : 0
5
5
max-same-issues : 0
6
6
linters :
7
+ disable :
8
+ - depguard
7
9
enable :
8
10
- errcheck
9
11
- gosimple
@@ -12,9 +14,15 @@ linters:
12
14
- staticcheck
13
15
- unused
14
16
# Defaults above ours below
17
+ - copyloopvar
18
+ - usestdlibvars
19
+ - whitespace
15
20
presets :
16
21
- bugs
22
+ - format
23
+ - import
17
24
- performance
25
+ - unused
18
26
# linters-settings:
19
27
# errcheck:
20
28
# check-type-assertions: true
Original file line number Diff line number Diff line change @@ -11,21 +11,19 @@ import (
11
11
"fmt"
12
12
"log/slog"
13
13
"net/http"
14
- "os"
15
- "time"
16
-
17
14
// #nosec G108
18
15
_ "net/http/pprof"
19
-
20
- "github.com/prometheus/client_golang/prometheus/promhttp"
21
- "go.uber.org/automaxprocs/maxprocs"
16
+ "os"
17
+ "time"
22
18
23
19
"github.com/blinklabs-io/cdnsd/internal/config"
24
20
"github.com/blinklabs-io/cdnsd/internal/dns"
25
21
"github.com/blinklabs-io/cdnsd/internal/indexer"
26
22
"github.com/blinklabs-io/cdnsd/internal/logging"
27
23
"github.com/blinklabs-io/cdnsd/internal/state"
28
24
"github.com/blinklabs-io/cdnsd/internal/version"
25
+ "github.com/prometheus/client_golang/prometheus/promhttp"
26
+ "go.uber.org/automaxprocs/maxprocs"
29
27
)
30
28
31
29
var cmdlineFlags struct {
Original file line number Diff line number Diff line change @@ -19,18 +19,15 @@ import (
19
19
20
20
"github.com/blinklabs-io/cdnsd/internal/config"
21
21
"github.com/blinklabs-io/cdnsd/internal/state"
22
-
23
22
"github.com/miekg/dns"
24
23
"github.com/prometheus/client_golang/prometheus"
25
24
"github.com/prometheus/client_golang/prometheus/promauto"
26
25
)
27
26
28
- var (
29
- metricQueryTotal = promauto .NewCounter (prometheus.CounterOpts {
30
- Name : "dns_query_total" ,
31
- Help : "total DNS queries handled" ,
32
- })
33
- )
27
+ var metricQueryTotal = promauto .NewCounter (prometheus.CounterOpts {
28
+ Name : "dns_query_total" ,
29
+ Help : "total DNS queries handled" ,
30
+ })
34
31
35
32
func Start () error {
36
33
cfg := config .GetConfig ()
Original file line number Diff line number Diff line change @@ -16,23 +16,22 @@ import (
16
16
"strings"
17
17
"time"
18
18
19
- "github.com/blinklabs-io/cdnsd/internal/config"
20
- "github.com/blinklabs-io/cdnsd/internal/logging"
21
- "github.com/blinklabs-io/cdnsd/internal/state"
22
- ouroboros "github.com/blinklabs-io/gouroboros"
23
- "github.com/prometheus/client_golang/prometheus"
24
- "github.com/prometheus/client_golang/prometheus/promauto"
25
-
26
19
"github.com/blinklabs-io/adder/event"
27
20
filter_event "github.com/blinklabs-io/adder/filter/event"
28
21
input_chainsync "github.com/blinklabs-io/adder/input/chainsync"
29
22
output_embedded "github.com/blinklabs-io/adder/output/embedded"
30
23
"github.com/blinklabs-io/adder/pipeline"
31
24
models "github.com/blinklabs-io/cardano-models"
25
+ "github.com/blinklabs-io/cdnsd/internal/config"
26
+ "github.com/blinklabs-io/cdnsd/internal/logging"
27
+ "github.com/blinklabs-io/cdnsd/internal/state"
28
+ ouroboros "github.com/blinklabs-io/gouroboros"
32
29
"github.com/blinklabs-io/gouroboros/cbor"
33
30
"github.com/blinklabs-io/gouroboros/ledger"
34
31
ocommon "github.com/blinklabs-io/gouroboros/protocol/common"
35
32
"github.com/miekg/dns"
33
+ "github.com/prometheus/client_golang/prometheus"
34
+ "github.com/prometheus/client_golang/prometheus/promauto"
36
35
)
37
36
38
37
const (
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ func Configure() {
48
48
Level : level ,
49
49
})
50
50
globalLogger = slog .New (handler ).With ("component" , "main" )
51
-
52
51
}
53
52
54
53
func GetLogger () * slog.Logger {
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ import (
11
11
)
12
12
13
13
// These are populated at build time
14
- var Version string
15
- var CommitHash string
14
+ var (
15
+ Version string
16
+ CommitHash string
17
+ )
16
18
17
19
func GetVersionString () string {
18
20
if Version != "" {
You can’t perform that action at this time.
0 commit comments