mirror of https://github.com/golang/go.git
net/netip: remove unused unexported functions and methods
Change-Id: I71774ad0197ce654dc56c2fa2fa12f1e6696382e Reviewed-on: https://go-review.googlesource.com/c/go/+/448395 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
6bead8f77a
commit
b417f62b00
|
|
@ -42,7 +42,6 @@ func TestInlining(t *testing.T) {
|
|||
"Addr.IsValid",
|
||||
"Addr.IsUnspecified",
|
||||
"Addr.Less",
|
||||
"Addr.lessOrEq",
|
||||
"Addr.Unmap",
|
||||
"Addr.Zone",
|
||||
"Addr.v4",
|
||||
|
|
@ -81,8 +80,6 @@ func TestInlining(t *testing.T) {
|
|||
case "amd64", "arm64":
|
||||
// These don't inline on 32-bit.
|
||||
wantInlinable = append(wantInlinable,
|
||||
"u64CommonPrefixLen",
|
||||
"uint128.commonPrefixLen",
|
||||
"Addr.Next",
|
||||
"Addr.Prev",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -459,8 +459,6 @@ func (ip Addr) Compare(ip2 Addr) int {
|
|||
// IPv6 addresses with zones sort just after the same address without a zone.
|
||||
func (ip Addr) Less(ip2 Addr) bool { return ip.Compare(ip2) == -1 }
|
||||
|
||||
func (ip Addr) lessOrEq(ip2 Addr) bool { return ip.Compare(ip2) <= 0 }
|
||||
|
||||
// Is4 reports whether ip is an IPv4 address.
|
||||
//
|
||||
// It returns false for IPv4-mapped IPv6 addresses. See Addr.Unmap.
|
||||
|
|
@ -1118,9 +1116,6 @@ func MustParseAddrPort(s string) AddrPort {
|
|||
return ip
|
||||
}
|
||||
|
||||
// isZero reports whether p is the zero AddrPort.
|
||||
func (p AddrPort) isZero() bool { return p == AddrPort{} }
|
||||
|
||||
// IsValid reports whether p.Addr() is valid.
|
||||
// All ports are valid, including zero.
|
||||
func (p AddrPort) IsValid() bool { return p.ip.IsValid() }
|
||||
|
|
|
|||
|
|
@ -60,17 +60,6 @@ func (u uint128) addOne() uint128 {
|
|||
return uint128{u.hi + carry, lo}
|
||||
}
|
||||
|
||||
func u64CommonPrefixLen(a, b uint64) uint8 {
|
||||
return uint8(bits.LeadingZeros64(a ^ b))
|
||||
}
|
||||
|
||||
func (u uint128) commonPrefixLen(v uint128) (n uint8) {
|
||||
if n = u64CommonPrefixLen(u.hi, v.hi); n == 64 {
|
||||
n += u64CommonPrefixLen(u.lo, v.lo)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// halves returns the two uint64 halves of the uint128.
|
||||
//
|
||||
// Logically, think of it as returning two uint64s.
|
||||
|
|
|
|||
Loading…
Reference in New Issue