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
+3 -3
View File
@@ -39,9 +39,9 @@ func (w *wrapperClientAbridged) Read(acks *conntypes.ConnectionAcks) (conntypes.
}
if msgLength == clientAbridgedSmallPacketLength {
buf.Grow(3)
buf.Grow(3) // nolint: gomnd
if _, err := io.CopyN(&buf, w.parent, 3); err != nil {
if _, err := io.CopyN(&buf, w.parent, 3); err != nil { // nolint: gomnd
return nil, fmt.Errorf("cannot read correct message length: %w", err)
}
@@ -75,7 +75,7 @@ func (w *wrapperClientAbridged) Write(packet conntypes.Packet, acks *conntypes.C
return nil
}
packetLength := len(packet) / 4
packetLength := len(packet) / 4 // nolint: gomnd
switch {
case packetLength < clientAbridgedSmallPacketLength: