Actually, ParseAddrPort is needed, since we give ip:port.
This commit is contained in:
parent
114d3cc931
commit
e695becbcd
@ -45,12 +45,12 @@ func main() {
|
||||
network = "unix"
|
||||
defer os.Remove(*listenAddress)
|
||||
} else {
|
||||
ap, err := netip.ParseAddr(*listenAddress)
|
||||
ap, err := netip.ParseAddrPort(*listenAddress)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
if ap.Is4() {
|
||||
if ap.Addr().Is4() {
|
||||
network = "tcp4"
|
||||
} else {
|
||||
network = "tcp6"
|
||||
|
Loading…
Reference in New Issue
Block a user