You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I will send a followup CL for better consistency. FWIW, unfortunately the following snippet works w/ CGO_ENABLED=1 older versions or GODEBUG=netdns=cgo newer versions.
package main
import "net"
func main() {
for _, arg := range []string{"127.0.0.1:+0", "127.0.0.1:-0"} {
ln, err := net.Listen("tcp", arg)
if err != nil {
println(err.Error())
continue
}
println(ln.Addr().String())
ln.Close()
}
}
Probably we should make consistent representation on transport service names and literal port numbers in ABNF for Dial/Listen APIs before Go 1.
https://go-review.googlesource.com/#/c/19720/ updated the parsing of port numbers, but now it accepts
stuff starting with a `+' sign, like:
Nobody ever told me why that should be allowed, but the CL was submitted anyway. Or I missed it, but I can't find it.
Investigate and ideally fix.
/cc @mikioh @msiebuhr
The text was updated successfully, but these errors were encountered: