From 2f55031c593ae842ab383c911aadcaee97a6715e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 14 Jun 2017 22:04:33 +0000 Subject: [PATCH] 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/45780 Reviewed-by: Chris Broadfoot --- doc/go1.9.html | 7 ++----- src/net/ipsock.go | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/go1.9.html b/doc/go1.9.html index 63e8b7a6d0..8f33a046d3 100644 --- a/doc/go1.9.html +++ b/doc/go1.9.html @@ -466,12 +466,9 @@ type T1 = T2 TODO: https://golang.org/cl/37260: allow Resolver to use a custom dialer

-

- TODO: https://golang.org/cl/37402: implement deadline functionality on Pipe -

-

- TODO: https://golang.org/cl/40510: don't enclose non-literal IPv6 addresses in square brackets + JoinHostPort 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 ('%') sign.

diff --git a/src/net/ipsock.go b/src/net/ipsock.go index 6049692d37..201c3f58bc 100644 --- a/src/net/ipsock.go +++ b/src/net/ipsock.go @@ -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. -- 2.50.0