Update golangci-lint

This commit is contained in:
9seconds
2020-08-10 14:39:50 +03:00
parent 8ac786581b
commit 7a6695f6c4
47 changed files with 133 additions and 114 deletions
+1 -2
View File
@@ -6,10 +6,9 @@ import (
"io"
"net"
"go.uber.org/zap"
"github.com/9seconds/mtg/conntypes"
"github.com/9seconds/mtg/utils"
"go.uber.org/zap"
)
const (
+1 -2
View File
@@ -7,9 +7,8 @@ import (
"io"
"net"
"go.uber.org/zap"
"github.com/9seconds/mtg/conntypes"
"go.uber.org/zap"
)
const clientIntermediateQuickAckLength = 0x80000000
@@ -6,9 +6,8 @@ import (
"fmt"
"math/rand"
"go.uber.org/zap"
"github.com/9seconds/mtg/conntypes"
"go.uber.org/zap"
)
type wrapperClientIntermediateSecure struct {
@@ -36,7 +35,7 @@ func (w *wrapperClientIntermediateSecure) Write(packet conntypes.Packet, acks *c
}
buf := &bytes.Buffer{}
paddingLength := rand.Intn(4)
paddingLength := rand.Intn(4) // nolint: gosec
buf.Grow(4 + len(packet) + paddingLength)
+2 -1
View File
@@ -64,6 +64,7 @@ func (w *wrapperProxy) Read(acks *conntypes.ConnectionAcks) (conntypes.Packet, e
func (w *wrapperProxy) Close() error {
w.proxy.Close()
return nil
}
@@ -77,7 +78,7 @@ func NewProxy(request *protocol.TelegramRequest) (conntypes.PacketAckReadWriteCl
flags |= rpc.ProxyRequestFlagsIntermediate
case conntypes.ConnectionTypeSecure:
flags |= rpc.ProxyRequestFlagsIntermediate | rpc.ProxyRequestFlagsPad
default:
case conntypes.ConnectionTypeUnknown:
panic("unknown connection type")
}