From: Mikio Hara Date: Thu, 17 Nov 2016 03:18:39 +0000 (+0900) Subject: net: tweak comment on ExampleCIDRMask X-Git-Tag: go1.8beta1~122 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b8d56fdd9379bd5bb89454f3679f01acecd9df4d;p=gostls13.git net: tweak comment on ExampleCIDRMask 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 --- diff --git a/src/net/example_test.go b/src/net/example_test.go index d52e7f196d..9dd1732454 100644 --- a/src/net/example_test.go +++ b/src/net/example_test.go @@ -37,11 +37,13 @@ func ExampleListener() { } 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 }