[#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:
parent
9e241ab91e
commit
4c2d8d5ac9
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue