IDAddressString returns id@hostPort. It strips the leading protocol from protocolHostPort if it exists.
(id ID, protocolHostPort string)
| 31 | // IDAddressString returns id@hostPort. It strips the leading |
| 32 | // protocol from protocolHostPort if it exists. |
| 33 | func IDAddressString(id ID, protocolHostPort string) string { |
| 34 | hostPort := removeProtocolIfDefined(protocolHostPort) |
| 35 | return fmt.Sprintf("%s@%s", id, hostPort) |
| 36 | } |
| 37 | |
| 38 | // NewNetAddress returns a new NetAddress using the provided TCP |
| 39 | // address. When testing, other net.Addr (except TCP) will result in |