net/netip: Prefix.Bits and Prefix.IsValid are inconsistent #54525
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The documentation for
Prefix.Bits
says:The documentation for
Prefix.IsValid
says:Thus, we expect the zero
Prefix
to be invalid, but also report -1 bits.Instead, we get 0 bits.
https://go.dev/play/p/rsc2Uy_jMX1
Either the behavior or the documentation should be adjusted.
\cc @bradfitz @josharian
The text was updated successfully, but these errors were encountered: