Let fission CLI tolerate URL with/without leading http://

This commit is contained in:
Soam Vasani
2016-12-10 19:56:45 -08:00
parent 7918b89fd2
commit 193cf594be
+3
View File
@@ -19,6 +19,7 @@ package main
import (
"fmt"
"os"
"strings"
"github.com/platform9/fission/controller/client"
)
@@ -34,6 +35,8 @@ func getClient(serverUrl string) *client.Client {
fatal("Need --server or FISSION_URL set to your fission server.")
}
serverUrl = "http://" + strings.TrimPrefix(serverUrl, "http://")
return client.MakeClient(serverUrl)
}