libp2p / go-reuseport

reuse tcp/udp ports in golang
ISC License
766 stars 108 forks source link

Control redeclared in this block #64

Closed pierreneter closed 5 years ago

pierreneter commented 5 years ago

When I run this command

go get -u github.com/libp2p/go-reuseport

it returns error:

# github.com/libp2p/go-reuseport
../../libp2p/go-reuseport/control_wasm.go:7:58: Control redeclared in this block
    previous declaration at ../../libp2p/go-reuseport/control_unix.go:11:58
../../libp2p/go-reuseport/interface.go:33:20: undefined: net.ListenConfig
../../libp2p/go-reuseport/interface.go:41:2: not enough arguments to return
../../libp2p/go-reuseport/interface.go:48:2: not enough arguments to return
../../libp2p/go-reuseport/interface.go:60:10: unknown field 'Control' in struct literal of type net.Dialer
pierreneter commented 5 years ago

Update golang to 1.11 maybe fix it, im trying...

pierreneter commented 5 years ago

because this repo use net.ListenConfig just available on golang version 1.11 (https://golang.org/pkg/net/#ListenConfig)

anacrolix commented 5 years ago

You need go1.11. gx or go.mod will help avoid these problems.