all: use various net/netip parse funcs directly
Mechanical change with perl+goimports. Changed {Must,}Parse{IP,IPPrefix,IPPort} to their netip variants, then goimports -d . Finally, removed the net/netaddr wrappers, to prevent future use. Updates #5162 Change-Id: I59c0e38b5fbca5a935d701645789cddf3d7863ad Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
730ca4203c
commit
6a396731eb
@ -17,8 +17,8 @@ package netns
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
||||
"tailscale.com/net/netaddr"
|
||||
"tailscale.com/net/netknob"
|
||||
"tailscale.com/syncs"
|
||||
"tailscale.com/types/logger"
|
||||
@ -100,6 +100,6 @@ func isLocalhost(addr string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
ip, _ := netaddr.ParseIP(host)
|
||||
ip, _ := netip.ParseAddr(host)
|
||||
return ip.IsLoopback()
|
||||
}
|
||||
|
Reference in New Issue
Block a user