forked from TrueCloudLab/frostfs-node
[#607] network: Reflect all supported formats in AddressFromString docs
Comment that `AddressFromString` function supports host addresses. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>support/v0.27
parent
9e241ab91e
commit
4c2d8d5ac9
|
@ -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 New Issue