From 6f5a77bf5f909e19fbc19f2c75ec1e160ec0aaa5 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Thu, 15 Dec 2016 06:26:58 +0900 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor Reviewed-by: Brad Fitzpatrick --- src/net/ip.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/net/ip.go b/src/net/ip.go index f73513e1e3f..11518f05f41 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 {