mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 14:14:02 +03:00
Update golangci-lint to 1.44.2
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user