Merge pull request #1164 from endocode/dongsu/fix-url-parse-in-golang-1.8

vendor: Better deal with failures under golang 1.8
pull/1169/head
dlorenc 2017-02-22 11:34:32 -08:00 committed by GitHub
commit e17c79ba60
2 changed files with 4 additions and 4 deletions

View File

@ -88,3 +88,6 @@ git commit -m "Manual changes to update Kubernetes to foo"
As a final part of updating kubernetes, a new version of localkube should be uploaded to GCS so that users can select this version of kubernetes/localkube in later minikube/localkube builds. For instructions on how to do this, see [LOCALKUBE_RELEASING.md](https://github.com/kubernetes/minikube/blob/master/LOCALKUBE_RELEASING.md)
#### Note on bugfix from Kubernetes
In case that specific bugfix patches have been applied to the k8s vendor tree, the patches could be at some point overwritten by next Kubernetes updates. So contributors should check if the vendor tree still contains the bugfixes even after having updated the vendor tree.

View File

@ -33,10 +33,7 @@ func DefaultServerURL(host, apiPath string, groupVersion unversioned.GroupVersio
}
base := host
hostURL, err := url.Parse(base)
if err != nil {
return nil, "", err
}
if hostURL.Scheme == "" || hostURL.Host == "" {
if err != nil || hostURL.Scheme == "" || hostURL.Host == "" {
scheme := "http://"
if defaultTLS {
scheme = "https://"