Skip to content

Commit

Permalink
[nspcc-dev#607] network: Remove unused HostAddrFromMultiaddr function.
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
  • Loading branch information
Leonard Lyubich committed Jun 16, 2021
1 parent 5fbdd53 commit 0ffe6ea
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/network/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 0ffe6ea

Please sign in to comment.