mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 06:02:32 -08:00
splithostport -> parseaddrport
This commit is contained in:
1 parent
e8b2224932
commit
ace8630d89
1 file changed
+2
-2
@@ -52,11 +52,11 @@ func raftAddr(host string, cfg Config) string {
|
||||
}
|
||||
|
||||
func addrFromServerAddress(sa string) (netip.Addr, error) {
|
||||
sAddr, _, err := net.SplitHostPort(sa)
|
||||
addrPort, err := netip.ParseAddrPort(sa)
|
||||
if err != nil {
|
||||
return netip.Addr{}, err
|
||||
}
|
||||
return netip.ParseAddr(sAddr)
|
||||
return addrPort.Addr(), nil
|
||||
}
|
||||
|
||||
// A selfRaftNode is the info we need to talk to hashicorp/raft about our node.
|
||||
|
||||
Reference in new issue
Block a user