]> Cypherpunks repositories - gostls13.git/commitdiff
net/netip: fix various typos in comments
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 3 Nov 2021 15:18:36 +0000 (16:18 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 3 Nov 2021 23:49:25 +0000 (23:49 +0000)
Change-Id: I67998f70969ac6e6ff1b52a56e49a61ef167ed50
Reviewed-on: https://go-review.googlesource.com/c/go/+/361055
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/netip/netip.go

index 4ef3b4bb685037a51b9e6eadd0d2efe3406cfbf8..d15a4947acf5b42325b08043b70eef7e993391c8 100644 (file)
@@ -4,7 +4,7 @@
 
 // Package netip defines a IP address type that's a small value type.
 // Building on that Addr type, the package also defines AddrPort (an
-// IP address and a port), and Prefix (a IP address and a bit length
+// IP address and a port), and Prefix (an IP address and a bit length
 // prefix).
 //
 // Compared to the net.IP type, this package's Addr type takes less
@@ -1184,7 +1184,7 @@ type Prefix struct {
        // bits is logically a uint8 (storing [0,128]) but also
        // encodes an "invalid" bit, currently represented by the
        // invalidPrefixBits sentinel value. It could be packed into
-       // the uint8 more with more comlicated expressions in the
+       // the uint8 more with more complicated expressions in the
        // accessors, but the extra byte (in padding anyway) doesn't
        // hurt and simplifies code below.
        bits int16
@@ -1195,7 +1195,7 @@ type Prefix struct {
 // public API.
 const invalidPrefixBits = -1
 
-// PrefixFrom returns an Prefix with the provided IP address and bit
+// PrefixFrom returns a Prefix with the provided IP address and bit
 // prefix length.
 //
 // It does not allocate. Unlike Addr.Prefix, PrefixFrom does not mask
@@ -1222,7 +1222,7 @@ func (p Prefix) Addr() Addr { return p.ip }
 // It reports -1 if invalid.
 func (p Prefix) Bits() int { return int(p.bits) }
 
-// IsValid reports whether whether p.Bits() has a valid range for p.IP().
+// IsValid reports whether p.Bits() has a valid range for p.IP().
 // If p.Addr() is the zero Addr, IsValid returns false.
 // Note that if p is the zero Prefix, then p.IsValid() == false.
 func (p Prefix) IsValid() bool { return !p.ip.isZero() && p.bits >= 0 && int(p.bits) <= p.ip.BitLen() }