mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
A bunch of CLI work
This commit is contained in:
parent
c4504fd3ff
commit
7fc78129f4
19 changed files with 225 additions and 153 deletions
|
@ -43,7 +43,7 @@ func (i *InetAddress) Less(i2 *InetAddress) bool {
|
|||
// NewInetAddressFromString parses an IP[/port] format address
|
||||
func NewInetAddressFromString(s string) *InetAddress {
|
||||
i := new(InetAddress)
|
||||
ss := strings.Split(s, "/")
|
||||
ss := strings.Split(strings.TrimSpace(s), "/")
|
||||
if len(ss) > 0 {
|
||||
i.IP = net.ParseIP(ss[0])
|
||||
i4 := i.IP.To4()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue