net: allow "" as a hint wildcard to Resolve{IP,UDP,TCP}Addr
Also fixes comments on ResolveIPAddr.
Fixes #4476.
R=bradfitz, golang-dev
CC=golang-dev
https://golang.org/cl/6854129
diff --git a/src/pkg/net/tcp_test.go b/src/pkg/net/tcp_test.go
index e8588c6..bca7488 100644
--- a/src/pkg/net/tcp_test.go
+++ b/src/pkg/net/tcp_test.go
@@ -130,6 +130,9 @@
{"tcp", "[::1]:1", &TCPAddr{IP: ParseIP("::1"), Port: 1}, nil},
{"tcp6", "[::1]:65534", &TCPAddr{IP: ParseIP("::1"), Port: 65534}, nil},
+ {"", "127.0.0.1:0", &TCPAddr{IP: IPv4(127, 0, 0, 1), Port: 0}, nil}, // Go 1.0 behavior
+ {"", "[::1]:0", &TCPAddr{IP: ParseIP("::1"), Port: 0}, nil}, // Go 1.0 behavior
+
{"http", "127.0.0.1:0", nil, UnknownNetworkError("http")},
}