Update golangci-lint to 1.44.2

This commit is contained in:
9seconds
2022-03-11 17:08:33 +03:00
parent 2077db1f1e
commit 5282ca26f3
17 changed files with 30 additions and 27 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ var bytesBufferPool = sync.Pool{
}
func acquireBytesBuffer() *bytes.Buffer {
return bytesBufferPool.Get().(*bytes.Buffer)
return bytesBufferPool.Get().(*bytes.Buffer) // nolint: forcetypeassert
}
func releaseBytesBuffer(b *bytes.Buffer) {
+1 -1
View File
@@ -11,7 +11,7 @@ var recordPool = sync.Pool{
}
func AcquireRecord() *Record {
return recordPool.Get().(*Record)
return recordPool.Get().(*Record) // nolint: forcetypeassert
}
func ReleaseRecord(r *Record) {
+2 -2
View File
@@ -21,7 +21,7 @@ var (
)
func acquireSha256Hasher() hash.Hash {
return sha256HasherPool.Get().(hash.Hash)
return sha256HasherPool.Get().(hash.Hash) // nolint: forcetypeassert
}
func releaseSha256Hasher(h hash.Hash) {
@@ -30,7 +30,7 @@ func releaseSha256Hasher(h hash.Hash) {
}
func acquireBytesBuffer() *bytes.Buffer {
return bytesBufferPool.Get().(*bytes.Buffer)
return bytesBufferPool.Get().(*bytes.Buffer) // nolint: forcetypeassert
}
func releaseBytesBuffer(buf *bytes.Buffer) {
@@ -69,7 +69,7 @@ func (suite *ServerHandshakeTestSuite) TestSendToTelegram() {
Once().
Run(func(args mock.Arguments) {
message := make([]byte, len(messageToTelegram))
suite.decryptor.XORKeyStream(message, args.Get(0).([]byte))
suite.decryptor.XORKeyStream(message, args.Get(0).([]byte)) // nolint: forcetypeassert
suite.Equal(messageToTelegram, message)
})
@@ -89,7 +89,7 @@ func (suite *ServerHandshakeTestSuite) TestRecieveFromTelegram() {
Run(func(args mock.Arguments) {
message := make([]byte, len(messageFromTelegram))
suite.encryptor.XORKeyStream(message, messageFromTelegram)
copy(args.Get(0).([]byte), message)
copy(args.Get(0).([]byte), message) // nolint: forcetypeassert
})
n, err := suite.proxyConn.Read(buffer)
+1 -1
View File
@@ -11,7 +11,7 @@ var copyBufferPool = sync.Pool{
}
func acquireCopyBuffer() *[]byte {
return copyBufferPool.Get().(*[]byte)
return copyBufferPool.Get().(*[]byte) // nolint: forcetypeassert
}
func releaseCopyBuffer(buf *[]byte) {