Fix bug when trying to get the external URL

Fix bug when trying to get the external URL

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin 2019-11-28 10:51:42 +08:00
parent 6c7ef36e60
commit 2498d597b4

View File

@ -253,7 +253,7 @@ func ExtURL() (string, error) {
log.Errorf("failed to load config, error %v", err)
}
l := strings.Split(endpoint, "://")
if len(l) > 0 {
if len(l) > 1 {
return l[1], nil
}
return endpoint, nil