mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 22:04:02 +03:00
Updates for go 1.18
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ func Init(ctx context.Context) error {
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
srv.Shutdown(context.Background()) // nolint: errcheck
|
||||
srv.Shutdown(context.Background()) // nolint: errcheck, contextcheck
|
||||
}()
|
||||
|
||||
Stats = multiStats(stats)
|
||||
|
||||
@@ -83,7 +83,7 @@ func (s *statsStatsd) ClientDisconnected(connectionType conntypes.ConnectionType
|
||||
}
|
||||
|
||||
func (s *statsStatsd) changeConnections(connectionType conntypes.ConnectionType, addr *net.TCPAddr, increment int64) {
|
||||
tags := make([]*statsStatsdTag, 0, 2)
|
||||
tags := make([]*statsStatsdTag, 0, 2) // nolint: gomnd
|
||||
|
||||
switch connectionType {
|
||||
case conntypes.ConnectionTypeAbridged:
|
||||
@@ -194,8 +194,8 @@ func newStatsStatsd() Interface {
|
||||
return &statsStatsd{
|
||||
seen: make(map[string]struct{}),
|
||||
client: statsd.NewClient(config.C.StatsdAddr.String(),
|
||||
statsd.SendLoopCount(2),
|
||||
statsd.ReconnectInterval(10*time.Second),
|
||||
statsd.SendLoopCount(2), // nolint: gomnd
|
||||
statsd.ReconnectInterval(10*time.Second), // nolint: gomnd
|
||||
statsd.Logger(logger),
|
||||
statsd.MetricPrefix(prefix),
|
||||
statsd.TagStyle(config.C.StatsdTagsFormat),
|
||||
|
||||
Reference in New Issue
Block a user