Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: typo in the ParseCIDR documentation #19891

Closed
pierrec opened this issue Apr 8, 2017 · 1 comment
Closed

net: typo in the ParseCIDR documentation #19891

pierrec opened this issue Apr 8, 2017 · 1 comment

Comments

@pierrec
Copy link

pierrec commented Apr 8, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8.1 darwin/amd64

What operating system and processor architecture are you using (go env)?

What did you do?

Reading the documentation for the ParseCIDR() function, I noticed a typo in the given example.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/oQLF5FmxvM

What did you expect to see?

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 192.0.2.1 and the network 192.0.2.0/24.

What did you see instead?

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.

@ALTree ALTree changed the title net: type in the ParseCIDR documentation net: typo in the ParseCIDR documentation Apr 8, 2017
@ALTree ALTree added this to the Go1.9 milestone Apr 8, 2017
@gopherbot
Copy link

CL https://golang.org/cl/40090 mentions this issue.

lparth pushed a commit to lparth/go that referenced this issue Apr 13, 2017
Fixes golang#19891

Change-Id: I2f2684dd5fbfcf93fca0f2c3caf678f44605687f
Reviewed-on: https://go-review.googlesource.com/40090
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants