]> Cypherpunks repositories - gostls13.git/commitdiff
net: tweak comment on ExampleCIDRMask
authorMikio Hara <mikioh.mikioh@gmail.com>
Thu, 17 Nov 2016 03:18:39 +0000 (12:18 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Thu, 17 Nov 2016 06:43:33 +0000 (06:43 +0000)
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>
src/net/example_test.go

index d52e7f196d7659e4d83cbcc8da447bab422c28b2..9dd173245459bb1eef09910838cdaec6a001c263 100644 (file)
@@ -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
 }