mirror of https://github.com/docker/docs.git
Use net.JoinHostPort to handle address format.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
This commit is contained in:
parent
f7c9214e29
commit
7554e882df
|
@ -89,7 +89,7 @@ func ParseAdvertise(advertise string) (string, error) {
|
||||||
return "", fmt.Errorf("couldnt find a valid ip-address in interface %s", advertise)
|
return "", fmt.Errorf("couldnt find a valid ip-address in interface %s", advertise)
|
||||||
}
|
}
|
||||||
|
|
||||||
addr = fmt.Sprintf("%s:%s", addr, port)
|
addr = net.JoinHostPort(addr, port)
|
||||||
return addr, nil
|
return addr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue