[#607] network: Remove unused HostAddrFromMultiaddr function.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-16 13:49:40 +03:00 committed by Leonard Lyubich
parent 95ccbbc2f9
commit 9e241ab91e

View file

@ -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()
}