forked from TrueCloudLab/frostfs-node
[#607] network: Remove unused HostAddrFromMultiaddr function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>support/v0.27
parent
95ccbbc2f9
commit
9e241ab91e
|
@ -131,13 +131,3 @@ func multiaddrStringFromHostAddr(host string) (string, error) {
|
|||
func IsLocalAddress(src LocalAddressSource, addr Address) bool {
|
||||
return src.LocalAddress().Equal(addr)
|
||||
}
|
||||
|
||||
// HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost:8080".
|
||||
func HostAddrFromMultiaddr(multiaddr string) (string, error) {
|
||||
address, err := AddressFromString(multiaddr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return address.HostAddrString()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue