aboutsummaryrefslogtreecommitdiff
path: root/opts
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-04-03 16:20:34 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-04-20 22:29:18 +0200
commiteebd8d3c0c40678a84f2e06243803ce1eeffb45f (patch)
tree34091830a46acfe8c5a97c514ad55672321020ae /opts
parentc66271f4dadc64614e1ac6d84dbcca99c1bad073 (diff)
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>
Diffstat (limited to 'opts')
-rw-r--r--opts/hosts.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/opts/hosts.go b/opts/hosts.go
index aaa41ec97f..8ecb7346f8 100644
--- a/opts/hosts.go
+++ b/opts/hosts.go
@@ -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