Skip to content

Commit

Permalink
Set env variables to viper (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunihiko-t authored and c0ze committed Jan 21, 2018
1 parent 4656100 commit 26b5699
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fn/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"github.com/iron-io/functions/fn/langs"
functions "github.com/iron-io/functions_go"
"github.com/spf13/viper"
"io"
"io/ioutil"
"log"
Expand All @@ -16,6 +13,10 @@ import (
"path/filepath"
"strings"
"text/template"

"github.com/iron-io/functions/fn/langs"
functions "github.com/iron-io/functions_go"
"github.com/spf13/viper"
)

var (
Expand All @@ -30,6 +31,7 @@ var (
)

func SetEnv() {
viper.AutomaticEnv()
API_VERSION = "/v1"
SSL_SKIP_VERIFY = (os.Getenv("SSL_SKIP_VERIFY") == "true")
JWT_AUTH_KEY = viper.GetString("jwt_auth_key")
Expand Down

0 comments on commit 26b5699

Please sign in to comment.