mirror of
https://github.com/golang/go.git
synced 2025-05-25 17:31:22 +00:00
net/netip: fix receiver name in Addr.{has,without}Zone comments
Change-Id: I851900cb52abfe75224a9dd9b9760eafd2cfc85f Reviewed-on: https://go-review.googlesource.com/c/go/+/407175 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
29057b707d
commit
a1ceacedd8
@ -498,7 +498,7 @@ func (ip Addr) WithZone(zone string) Addr {
|
|||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
|
|
||||||
// withoutZone unconditionally strips the zone from IP.
|
// withoutZone unconditionally strips the zone from ip.
|
||||||
// It's similar to WithZone, but small enough to be inlinable.
|
// It's similar to WithZone, but small enough to be inlinable.
|
||||||
func (ip Addr) withoutZone() Addr {
|
func (ip Addr) withoutZone() Addr {
|
||||||
if !ip.Is6() {
|
if !ip.Is6() {
|
||||||
@ -508,7 +508,7 @@ func (ip Addr) withoutZone() Addr {
|
|||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
|
|
||||||
// hasZone reports whether IP has an IPv6 zone.
|
// hasZone reports whether ip has an IPv6 zone.
|
||||||
func (ip Addr) hasZone() bool {
|
func (ip Addr) hasZone() bool {
|
||||||
return ip.z != z0 && ip.z != z4 && ip.z != z6noz
|
return ip.z != z0 && ip.z != z4 && ip.z != z6noz
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user