mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
opts: ParseTCPAddr(): remove workaround for go1.5
Current versions of Go no longer have a problem with the trailing colon when using url.Parse() or net.SplitHostPort(), so we can remove this workaround. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c66271f4da
commit
eebd8d3c0c
1 changed files with 0 additions and 7 deletions
|
@ -132,13 +132,6 @@ func ParseTCPAddr(tryAddr string, defaultAddr string) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// url.Parse fails for trailing colon on IPv6 brackets on Go 1.5, but
|
||||
// not 1.4. See https://github.com/golang/go/issues/12200 and
|
||||
// https://github.com/golang/go/issues/6530.
|
||||
if strings.HasSuffix(addr, "]:") {
|
||||
addr += defaultPort
|
||||
}
|
||||
|
||||
u, err := url.Parse("tcp://" + addr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
Loading…
Reference in a new issue