Skip to content

Commit 8542f7e

Browse files
committed
reformat
1 parent 20f40a2 commit 8542f7e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

dialer/dialer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
// DefaultDialer is the default Dialer and is used by DialContext and ListenPacket.
13-
var DefaultDialer = New()
13+
var DefaultDialer = &Dialer{}
1414

1515
// RegisterSockOpt registers the given socket option to DefaultDialer.
1616
func RegisterSockOpt(opt SocketOption) {

dialer/sockopt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"syscall"
66
)
77

8-
var _ SocketOption = SocketOptionFunc(nil)
8+
var _ SocketOption = (SocketOptionFunc)(nil)
99

1010
type SocketOption interface {
1111
Apply(network, address string, c syscall.RawConn) error
@@ -17,7 +17,7 @@ func (f SocketOptionFunc) Apply(network, address string, c syscall.RawConn) erro
1717
return f(network, address, c)
1818
}
1919

20-
var unsupportedSocketOption = SocketOptionFunc(func(_, _ string, _ syscall.RawConn) error {
20+
var UnsupportedSocketOption = SocketOptionFunc(func(_, _ string, _ syscall.RawConn) error {
2121
return errors.ErrUnsupported
2222
})
2323

dialer/sockopt_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ func WithInterface(iface *net.Interface) SocketOption {
2121
})
2222
}
2323

24-
func WithRoutingMark(_ int) SocketOption { return unsupportedSocketOption }
24+
func WithRoutingMark(_ int) SocketOption { return UnsupportedSocketOption }

dialer/sockopt_freebsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"golang.org/x/sys/unix"
88
)
99

10-
func WithInterface(_ *net.Interface) SocketOption { return unsupportedSocketOption }
10+
func WithInterface(_ *net.Interface) SocketOption { return UnsupportedSocketOption }
1111

1212
func WithRoutingMark(mark int) SocketOption {
1313
return SocketOptionFunc(func(network, address string, c syscall.RawConn) error {

dialer/sockopt_openbsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"golang.org/x/sys/unix"
88
)
99

10-
func WithInterface(_ *net.Interface) SocketOption { return unsupportedSocketOption }
10+
func WithInterface(_ *net.Interface) SocketOption { return UnsupportedSocketOption }
1111

1212
func WithRoutingMark(mark int) SocketOption {
1313
return SocketOptionFunc(func(network, address string, c syscall.RawConn) error {

dialer/sockopt_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func WithInterface(iface *net.Interface) SocketOption {
3333
})
3434
}
3535

36-
func WithRoutingMark(_ int) SocketOption { return unsupportedSocketOption }
36+
func WithRoutingMark(_ int) SocketOption { return UnsupportedSocketOption }
3737

3838
func bindSocketToInterface4(handle windows.Handle, index uint32) error {
3939
// For IPv4, this parameter must be an interface index in network byte order.

0 commit comments

Comments
 (0)