fix drivers GetUrl to build propper IPv6 addr

Signed-off-by: Vladimir Varankin <nek.narqo+git@gmail.com>
This commit is contained in:
Vladimir Varankin
2015-11-13 12:52:12 +03:00
parent 45d38fd31b
commit 0735f3f447
11 changed files with 21 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ package softlayer
import (
"fmt"
"io/ioutil"
"net"
"os"
"regexp"
"time"
@@ -265,7 +266,7 @@ func (d *Driver) GetURL() (string, error) {
if ip == "" {
return "", nil
}
return "tcp://" + ip + ":2376", nil
return "tcp://" + net.JoinHostPort(ip, "2376"), nil
}
func (d *Driver) GetIP() (string, error) {