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: ParsePrefix documentation typo "2001::db8::/32" #50950

alcicd opened this issue Feb 1, 2022 · 1 comment

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

alcicd opened this issue Feb 1, 2022 · 1 comment
Documentation NeedsFix


Copy link

@alcicd alcicd commented Feb 1, 2022

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

$ go version

Does this issue reproduce with the latest release?


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 (

// 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 "" or "2001::db8::/32",

@seankhliao seankhliao added the NeedsFix label Feb 1, 2022
Copy link

@gopherbot gopherbot commented Feb 1, 2022

Change mentions this issue: net/netip: correct ipv6 address in ParsePrefix comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Documentation NeedsFix
None yet

No branches or pull requests

3 participants