CIDRMask just returns a mask which corresponds to an address
prefix in CIDR nonation. A subnet for an IPv6 mask sounds a bit
confusing.
Change-Id: Ic7859ce992bc2de4043d3b25caf9a1051d118b0e
Reviewed-on: https://go-review.googlesource.com/33262
Reviewed-by: Ian Lance Taylor <iant@golang.org>
}
func ExampleCIDRMask() {
- // This mask corresponds to a /31 subnet
+ // This mask corresponds to a /31 subnet for IPv4.
fmt.Println(net.CIDRMask(31, 32))
- // This mask corresponds to a /64 subnet for a IPv6 mask
+ // This mask corresponds to a /64 subnet for IPv6.
fmt.Println(net.CIDRMask(64, 128))
- // Output: fffffffe
+
+ // Output:
+ // fffffffe
// ffffffffffffffff0000000000000000
}