Commit 2f55031c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net, doc: document JoinHostPort change in release notes, clarify its docs

Updates #18059
Updates #20587

Change-Id: Icbb4c7cb201ac51d2cc6066620b47ba09ff6fe65
Reviewed-on: https://go-review.googlesource.com/45780Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
parent 862e45d4
......@@ -466,12 +466,9 @@ type T1 = T2
TODO: <a href="https://golang.org/cl/37260">https://golang.org/cl/37260</a>: allow Resolver to use a custom dialer
</p>
<p><!-- CL 37402 -->
TODO: <a href="https://golang.org/cl/37402">https://golang.org/cl/37402</a>: implement deadline functionality on Pipe
</p>
<p><!-- CL 40510 -->
TODO: <a href="https://golang.org/cl/40510">https://golang.org/cl/40510</a>: don&#39;t enclose non-literal IPv6 addresses in square brackets
<a href="/pkg/net/#JoinHostPort"><code>JoinHostPort</code></a> now only places an address in square brackets if the host contains a colon.
In previous releases it would also wrap addresses in square brackets if they contained a percent ('<code>%</code>') sign.
</p>
<p><!-- CL 40512 -->
......
......@@ -194,8 +194,8 @@ func splitHostZone(s string) (host, zone string) {
}
// JoinHostPort combines host and port into a network address of the
// form "host:port" or "host%zone:port", if host is a literal IPv6
// address, "[host]:port" or [host%zone]:port.
// form "host:port". If host contains a colon, as found in literal
// IPv6 addresses, then JoinHostPort returns "[host]:port".
func JoinHostPort(host, port string) string {
// We assume that host is a literal IPv6 address if host has
// colons.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment