What version of Go are you using (go version)?
1.14
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
All operating system and processor architectures
What did you do?
https://play.golang.org/p/IN-TOcROQnr
// "8.8.8.8" translated to IPv6, same as net.ParseIP("8.8.8.8")
ip := net.ParseIP("0:0:0:0:0:ffff:808:808")
_, ipv4, _ := net.ParseCIDR("0.0.0.0/0")
fmt.Println(ipv4.Contains(ip)) // true
_, ipv6, _ := net.ParseCIDR("::/0")
fmt.Println(ipv6.Contains(ip)) // why it says false?
_, translated, _ := net.ParseCIDR("::ffff:0:0/96")
fmt.Println(translated.Contains(ip)) // true
What did you expect to see?
What did you see instead?
What version of Go are you using (
go version)?1.14
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?All operating system and processor architectures
What did you do?
https://play.golang.org/p/IN-TOcROQnr
What did you expect to see?
What did you see instead?