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/netip: documentation: p.IP() should say p.Addr() #56664

Closed
candlerb opened this issue Nov 9, 2022 · 3 comments
Closed

net/netip: documentation: p.IP() should say p.Addr() #56664

candlerb opened this issue Nov 9, 2022 · 3 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@candlerb
Copy link

candlerb commented Nov 9, 2022

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

Any 1.18+

Does this issue reproduce with the latest release?

N/A

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

N/A

What did you do?

Read the documentation for net/netip package online.

https://pkg.go.dev/net/netip#AddrPort.IsValid

"IsValid reports whether p.IP() is valid."

https://pkg.go.dev/net/netip#Prefix.IsValid

"IsValid reports whether p.Bits() has a valid range for p.IP()"

However, neither AddrPort nor Prefix has an IP() method.

What did you expect to see?

I think p.IP() should say p.Addr() in both cases

What did you see instead?

See above

@mknyszek
Copy link
Contributor

mknyszek commented Nov 9, 2022

CC @neild

@mknyszek mknyszek added this to the Backlog milestone Nov 9, 2022
@mknyszek mknyszek added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 9, 2022
@mknyszek
Copy link
Contributor

mknyszek commented Nov 9, 2022

This seems like a pretty straightforward documentation issue. @candlerb if you're so inclined, feel free to https://go.dev/doc/contribute the patch! Otherwise I can handle it later.

@AlexanderYastrebov
Copy link
Contributor

This has been fixed by https://go-review.googlesource.com/c/go/+/421995

@golang golang locked and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants