Use FN_TOKEN not iron_token

This commit is contained in:
James Jeffrey
2017-06-26 17:16:15 -07:00
parent ad11f0699a
commit 4738cd3aae

View File

@@ -3,11 +3,12 @@ package main
import ( import (
"os" "os"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
fnclient "github.com/funcy/functions_go/client"
"log" "log"
"net/url" "net/url"
fnclient "github.com/funcy/functions_go/client"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
) )
func host() string { func host() string {
@@ -26,8 +27,8 @@ func host() string {
func apiClient() *fnclient.Functions { func apiClient() *fnclient.Functions {
transport := httptransport.New(host(), "/v1", []string{"http"}) transport := httptransport.New(host(), "/v1", []string{"http"})
if os.Getenv("IRON_TOKEN") != "" { if os.Getenv("FN_TOKEN") != "" {
transport.DefaultAuthentication = httptransport.BearerToken(os.Getenv("IRON_TOKEN")) transport.DefaultAuthentication = httptransport.BearerToken(os.Getenv("FN_TOKEN"))
} }
// create the API client, with the transport // create the API client, with the transport