summaryrefslogtreecommitdiffhomepage
path: root/conn/bind_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-12-09 17:55:50 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-12-09 23:15:55 +0100
commit9c9e7e2724340280d0ca4ff29c067f2d144562c0 (patch)
tree239826ccafe70e5cee73936d9bcea8989dd33899 /conn/bind_windows.go
parent2dd424e2d808703339688ff78e32ed30cd0dfe87 (diff)
global: apply gofumpt
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conn/bind_windows.go')
-rw-r--r--conn/bind_windows.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/conn/bind_windows.go b/conn/bind_windows.go
index 26a3af8..476e277 100644
--- a/conn/bind_windows.go
+++ b/conn/bind_windows.go
@@ -91,8 +91,10 @@ type WinRingEndpoint struct {
data [30]byte
}
-var _ Bind = (*WinRingBind)(nil)
-var _ Endpoint = (*WinRingEndpoint)(nil)
+var (
+ _ Bind = (*WinRingBind)(nil)
+ _ Endpoint = (*WinRingEndpoint)(nil)
+)
func (*WinRingBind) ParseEndpoint(s string) (Endpoint, error) {
host, port, err := net.SplitHostPort(s)
@@ -382,7 +384,6 @@ retry:
count = winrio.DequeueCompletion(bind.rx.cq, results[:])
if count == 0 {
return 0, nil, io.ErrNoProgress
-
}
}
bind.rx.Return(1)
@@ -533,6 +534,7 @@ func (bind *StdNetBind) BindSocketToInterface6(interfaceIndex uint32, blackhole
bind.blackhole6 = blackhole
return nil
}
+
func (bind *WinRingBind) BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error {
bind.mu.RLock()
defer bind.mu.RUnlock()