Updates for go 1.18

This commit is contained in:
9seconds
2022-03-19 14:36:04 +03:00
parent 8da55410de
commit e74726af70
29 changed files with 79 additions and 68 deletions
+1 -1
View File
@@ -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)
+3 -3
View File
@@ -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),