aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2017-06-06 11:12:34 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2017-06-23 00:09:48 +0000
commitb88efc7e7ac15f9e0b5d8d9c82f870294f6a3839 (patch)
treeb4193f43e917121e19600019076e116eb9736249
parent47e659b01fa0e90906f2294e396ff2be03032966 (diff)
downloadgo-b88efc7e7ac15f9e0b5d8d9c82f870294f6a3839.tar.xz
net: update documentation on IP.IsUnspecified
Fixes #19344. Change-Id: Ic6fc7485cb50bfae99fda69d0cd9c4ae434af4c3 Reviewed-on: https://go-review.googlesource.com/44910 Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/net/ip.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/ip.go b/src/net/ip.go
index 668818cc4f..6b7ba4c23e 100644
--- a/src/net/ip.go
+++ b/src/net/ip.go
@@ -108,7 +108,8 @@ var (
IPv6linklocalallrouters = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02}
)
-// IsUnspecified reports whether ip is an unspecified address.
+// IsUnspecified reports whether ip is an unspecified address, either
+// the IPv4 address "0.0.0.0" or the IPv6 address "::".
func (ip IP) IsUnspecified() bool {
return ip.Equal(IPv4zero) || ip.Equal(IPv6unspecified)
}