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
@@ -20,7 +20,7 @@ func (w *wrapperClientIntermediateSecure) Read(acks *conntypes.ConnectionAcks) (
return nil, err
}
length := len(data) - (len(data) % 4)
length := len(data) - (len(data) % 4) // nolint: gomnd
return data[:length], nil
}
@@ -35,7 +35,7 @@ func (w *wrapperClientIntermediateSecure) Write(packet conntypes.Packet, acks *c
}
buf := &bytes.Buffer{}
paddingLength := rand.Intn(4) // nolint: gosec
paddingLength := rand.Intn(4) // nolint: gosec, gomnd
buf.Grow(4 + len(packet) + paddingLength)