[#607] network: Reflect all supported formats in AddressFromString docs

Comment that `AddressFromString` function supports host addresses.

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

View file

@ -73,7 +73,9 @@ func (a Address) HostAddrString() (string, error) {
return host, nil
}
// AddressFromString restores address from a multiaddr string representation.
// AddressFromString restores address from a string representation.
//
// Supports MultiAddr and HostAddr strings.
func AddressFromString(s string) (*Address, error) {
ma, err := multiaddr.NewMultiaddr(s)
if err != nil {