splithostport -> parseaddrport

This commit is contained in:
Fran Bull committed 2025-02-27 07:47:07 -08:00
1 parent e8b2224932
commit ace8630d89
1 file changed
+2 -2
+2 -2
View File
@@ -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.