mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 10:44:02 +03:00
Update golangci-lint to 1.44.2
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ func (d *defaultDialer) DialContext(ctx context.Context, network, address string
|
||||
return nil, fmt.Errorf("cannot set socket options: %w", err)
|
||||
}
|
||||
|
||||
return conn.(essentials.Conn), nil
|
||||
return conn.(essentials.Conn), nil // nolint: forcetypeassert
|
||||
}
|
||||
|
||||
// NewDefaultDialer build a new dialer which dials bypassing proxies
|
||||
|
||||
@@ -14,11 +14,11 @@ type DialerMock struct {
|
||||
func (d *DialerMock) Dial(network, address string) (essentials.Conn, error) {
|
||||
args := d.Called(network, address)
|
||||
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
|
||||
}
|
||||
|
||||
func (d *DialerMock) DialContext(ctx context.Context, network, address string) (essentials.Conn, error) {
|
||||
args := d.Called(ctx, network, address)
|
||||
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ type DialerMock struct {
|
||||
func (d *DialerMock) Dial(network, address string) (essentials.Conn, error) {
|
||||
args := d.Called(network, address)
|
||||
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
|
||||
}
|
||||
|
||||
func (d *DialerMock) DialContext(ctx context.Context, network, address string) (essentials.Conn, error) {
|
||||
args := d.Called(ctx, network, address)
|
||||
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck
|
||||
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
|
||||
}
|
||||
|
||||
type HTTPServerTestSuite struct {
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@ import (
|
||||
//
|
||||
// bufferSize setting is deprecated and ignored.
|
||||
func SetClientSocketOptions(conn net.Conn, bufferSize int) error {
|
||||
return setCommonSocketOptions(conn.(*net.TCPConn))
|
||||
return setCommonSocketOptions(conn.(*net.TCPConn)) // nolint: forcetypeassert
|
||||
}
|
||||
|
||||
// SetServerSocketOptions tunes a TCP socket that represents a connection to
|
||||
// remote server like Telegram or fronting domain (but not end user).
|
||||
func SetServerSocketOptions(conn net.Conn, bufferSize int) error {
|
||||
return setCommonSocketOptions(conn.(*net.TCPConn))
|
||||
return setCommonSocketOptions(conn.(*net.TCPConn)) // nolint: forcetypeassert
|
||||
}
|
||||
|
||||
func setCommonSocketOptions(conn *net.TCPConn) error {
|
||||
|
||||
Reference in New Issue
Block a user