aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2016-12-15 06:26:58 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2016-12-15 08:40:28 +0000
commit6f5a77bf5f909e19fbc19f2c75ec1e160ec0aaa5 (patch)
tree3621db72b51156aa08a5891cc51b181e7db5537b
parentc1ada22bc1ddf798a8931a09c8fa7c878c9ee6b9 (diff)
downloadgo-6f5a77bf5f909e19fbc19f2c75ec1e160ec0aaa5.tar.gz
go-6f5a77bf5f909e19fbc19f2c75ec1e160ec0aaa5.zip
net: fix ParseCIDR docs
This change replaces the remaining use of "mask" with "prefix length" and uses IPv4 reserved address blocks for documentation. UPdates #15228. Updates #18175. Change-Id: I56c4f1205821c64f3195b023ad515b9d54e33f64 Reviewed-on: https://go-review.googlesource.com/34431 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/net/ip.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/ip.go b/src/net/ip.go
index f73513e1e3..11518f05f4 100644
--- a/src/net/ip.go
+++ b/src/net/ip.go
@@ -658,9 +658,10 @@ func ParseIP(s string) IP {
// like "192.0.2.0/24" or "2001:db8::/32", as defined in
// RFC 4632 and RFC 4291.
//
-// It returns the IP address and the network implied by the IP
-// and mask. For example, ParseCIDR("198.51.100.1/24") returns
-// the IP address 198.51.100.1 and the network 198.51.100.0/24.
+// It returns the IP address and the network implied by the IP and
+// prefix length.
+// For example, ParseCIDR("192.0.2.1/24") returns the IP address
+// 198.0.2.1 and the network 198.0.2.0/24.
func ParseCIDR(s string) (IP, *IPNet, error) {
i := byteIndex(s, '/')
if i < 0 {