Update golanci-lint

This commit is contained in:
9seconds
2021-04-09 14:35:04 +03:00
parent 81bca75c25
commit 585ebfeb50
32 changed files with 101 additions and 75 deletions
+4 -1
View File
@@ -31,7 +31,10 @@ func (d *defaultDialer) DialContext(ctx context.Context, network, address string
return nil, fmt.Errorf("cannot dial to %s: %w", address, err)
}
tcpConn := conn.(*net.TCPConn)
tcpConn, ok := conn.(*net.TCPConn)
if !ok {
panic("conn type is not tcp")
}
if err := tcpConn.SetNoDelay(true); err != nil {
conn.Close()