]> Cypherpunks repositories - gostls13.git/commitdiff
net: update documentation on IP.IsUnspecified
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 6 Jun 2017 02:12:34 +0000 (11:12 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Fri, 23 Jun 2017 00:09:48 +0000 (00:09 +0000)
Fixes #19344.

Change-Id: Ic6fc7485cb50bfae99fda69d0cd9c4ae434af4c3
Reviewed-on: https://go-review.googlesource.com/44910
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/ip.go

index 668818cc4fcdc6034aa4192b22944e00b0f9e2b7..6b7ba4c23ea49ba1b6a453c419563099f2a57701 100644 (file)
@@ -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)
 }