Fix lint issues

This commit is contained in:
9seconds
2021-12-01 11:07:32 +03:00
parent 9a6264a89f
commit e7416bc04d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ func pump(log Logger, src, dst essentials.Conn, wg *sync.WaitGroup, direction st
defer func() { defer func() {
syncer.Flush() syncer.Flush()
releaseSyncPair(syncer) releaseSyncPair(syncer)
src.CloseRead() src.CloseRead() // nolint: errcheck
dst.CloseWrite() dst.CloseWrite() // nolint: errcheck
wg.Done() wg.Done()
}() }()
+2 -2
View File
@@ -42,7 +42,7 @@ func (s *syncPair) Write(p []byte) (int, error) {
s.mutex.Lock() s.mutex.Lock()
defer s.mutex.Unlock() 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 // 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 // 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() err = s.writer.Flush()
} }
return n, err return n, err // nolint: wrapcheck
} }
func (s *syncPair) Flush() error { func (s *syncPair) Flush() error {