Quote malformed host values in unversioned client helper

This commit is contained in:
Paul Morie 2015-08-27 17:30:31 -04:00
parent 986d37d145
commit e9851c6dea

View File

@ -479,7 +479,7 @@ func DefaultServerURL(host, prefix, version string, defaultTLS bool) (*url.URL,
return nil, err
}
if hostURL.Path != "" && hostURL.Path != "/" {
return nil, fmt.Errorf("host must be a URL or a host:port pair: %s", base)
return nil, fmt.Errorf("host must be a URL or a host:port pair: %q", base)
}
}