Satisfy golint, clarify logic

This commit is contained in:
Andrew Stuart
2017-01-31 08:25:57 -07:00
parent 39fb45d8da
commit 1cc1fac151
+3 -3
View File
@@ -35,10 +35,10 @@ func getClient(serverUrl string) *client.Client {
fatal("Need --server or FISSION_URL set to your fission server.")
}
isHttps := strings.Index(serverUrl, "https://") == 0
isHttp := strings.Index(serverUrl, "http://") == 0
isHTTPS := strings.Index(serverUrl, "https://") == 0
isHTTP := strings.Index(serverUrl, "http://") == 0
if !isHttp && !isHttps {
if !(isHTTP || isHTTPS) {
serverUrl = "http://" + serverUrl
}