mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 10:44:02 +03:00
Fix lint issues
This commit is contained in:
@@ -38,8 +38,8 @@ func pump(log Logger, src, dst essentials.Conn, wg *sync.WaitGroup, direction st
|
||||
defer func() {
|
||||
syncer.Flush()
|
||||
releaseSyncPair(syncer)
|
||||
src.CloseRead()
|
||||
dst.CloseWrite()
|
||||
src.CloseRead() // nolint: errcheck
|
||||
dst.CloseWrite() // nolint: errcheck
|
||||
wg.Done()
|
||||
}()
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ func (s *syncPair) Write(p []byte) (int, error) {
|
||||
s.mutex.Lock()
|
||||
defer s.mutex.Unlock()
|
||||
|
||||
n, err := s.writer.Write(p) // nolint: wrapcheck
|
||||
n, err := s.writer.Write(p)
|
||||
|
||||
// optimization for a case when we have a small package and want to avoid a
|
||||
// delay in readTimeout. In that case, we assume that peer has finished to
|
||||
@@ -52,7 +52,7 @@ func (s *syncPair) Write(p []byte) (int, error) {
|
||||
err = s.writer.Flush()
|
||||
}
|
||||
|
||||
return n, err
|
||||
return n, err // nolint: wrapcheck
|
||||
}
|
||||
|
||||
func (s *syncPair) Flush() error {
|
||||
|
||||
Reference in New Issue
Block a user