15003: Merge branch 'master' into 15003-preprocess-config
[arvados.git] / sdk / go / arvados / client.go
index 2b82df9b8a941d9d6305d5d6c80d91e33f55d5e7..cbc2ca72f035f150fce46613fa015d299a9bbd7b 100644 (file)
@@ -76,10 +76,10 @@ var DefaultSecureClient = &http.Client{
 func NewClientFromConfig(cluster *Cluster) (*Client, error) {
        ctrlURL := cluster.Services.Controller.ExternalURL
        if ctrlURL.Host == "" {
-               return nil, fmt.Errorf("no host in config Services.Controller.ExternalURL: %s", ctrlURL)
+               return nil, fmt.Errorf("no host in config Services.Controller.ExternalURL: %v", ctrlURL)
        }
        return &Client{
-               APIHost:  fmt.Sprintf("%s", ctrlURL),
+               APIHost:  ctrlURL.Host,
                Insecure: cluster.TLS.Insecure,
        }, nil
 }