From 4c2d8d5ac9532f043c04bb143b795db4b62ad2e3 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 16 Jun 2021 14:00:49 +0300 Subject: [PATCH] [#607] network: Reflect all supported formats in AddressFromString docs Comment that `AddressFromString` function supports host addresses. Signed-off-by: Leonard Lyubich --- pkg/network/address.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/network/address.go b/pkg/network/address.go index 77c5a2f24b..b39ed02a61 100644 --- a/pkg/network/address.go +++ b/pkg/network/address.go @@ -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 {