libp2p/go-reuseport

Control redeclared in this block

Closed this issue · 3 comments

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

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

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

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