Skip to content

net/netip: ParsePrefix documentation typo "2001::db8::/32" #50950

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

Closed
alcicd opened this issue Feb 1, 2022 · 1 comment
Closed

net/netip: ParsePrefix documentation typo "2001::db8::/32" #50950

alcicd opened this issue Feb 1, 2022 · 1 comment
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.

Comments

@alcicd
Copy link

alcicd commented Feb 1, 2022

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

$ go version
go1.18beta2

Does this issue reproduce with the latest release?

Yes

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

Not applicable

What did you do?

Read docs/code

What did you expect to see?

Valid CIDR notation

What did you see instead?

Invalid CIDR notation

"2001::db8::/32" includes an invalid IPv6 address. The double colon may appear only once. This code panics:

package main

import (
	"net/netip"
)

// This playground uses a development build of Go:
// devel go1.18-41f485b9a7 Mon Jan 31 13:43:52 2022 +0000

func main() {
	_ = netip.MustParsePrefix("2001::db8::/32")
}

// The string can be in the form "192.168.1.0/24" or "2001::db8::/32",

@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Feb 1, 2022
@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 1, 2022
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/382294 mentions this issue: net/netip: correct ipv6 address in ParsePrefix comment

@golang golang locked and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to 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

3 participants