aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharath Thiruveedula <tbharath91@gmail.com>2019-08-06 09:26:48 +0530
committerIan Lance Taylor <iant@golang.org>2019-08-06 15:09:26 +0000
commit8e82624e691387eed2261e6c34decb27348f4685 (patch)
tree7b30d972ff83d9691a3afc5f3ebc82dc848d9568
parent546ea78efa159680dde0df42f1f2091ccafef4df (diff)
downloadgo-8e82624e691387eed2261e6c34decb27348f4685.tar.gz
go-8e82624e691387eed2261e6c34decb27348f4685.zip
net: fix the docs in IPNet.String
Fixes #33433 Change-Id: Idb3961685a3cfd13ba26155a1d64fc24cc418fdb Reviewed-on: https://go-review.googlesource.com/c/go/+/189117 Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/net/ip.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/ip.go b/src/net/ip.go
index cf90c0cd54..1a1d0e7dba 100644
--- a/src/net/ip.go
+++ b/src/net/ip.go
@@ -513,12 +513,12 @@ func (n *IPNet) Contains(ip IP) bool {
// Network returns the address's network name, "ip+net".
func (n *IPNet) Network() string { return "ip+net" }
-// String returns the CIDR notation of n like "192.0.2.1/24"
+// String returns the CIDR notation of n like "192.0.2.0/24"
// or "2001:db8::/48" as defined in RFC 4632 and RFC 4291.
// If the mask is not in the canonical form, it returns the
// string which consists of an IP address, followed by a slash
// character and a mask expressed as hexadecimal form with no
-// punctuation like "198.51.100.1/c000ff00".
+// punctuation like "198.51.100.0/c000ff00".
func (n *IPNet) String() string {
nn, m := networkNumberAndMask(n)
if nn == nil || m == nil {