forked from TrueCloudLab/frostfs-node
[#607] network: Remove unused HostAddrFromMultiaddr function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
95ccbbc2f9
commit
9e241ab91e
1 changed files with 0 additions and 10 deletions
|
@ -131,13 +131,3 @@ func multiaddrStringFromHostAddr(host string) (string, error) {
|
||||||
func IsLocalAddress(src LocalAddressSource, addr Address) bool {
|
func IsLocalAddress(src LocalAddressSource, addr Address) bool {
|
||||||
return src.LocalAddress().Equal(addr)
|
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 a new issue