Trim space from env variables (#1399)
This commit is contained in:
parent
84b4eb5404
commit
914340585c
@ -15,6 +15,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v2/store"
|
"github.com/micro/go-micro/v2/store"
|
||||||
@ -79,9 +80,9 @@ type apiMessage struct {
|
|||||||
|
|
||||||
// getOptions returns account id, token and namespace
|
// getOptions returns account id, token and namespace
|
||||||
func getOptions() (string, string, string) {
|
func getOptions() (string, string, string) {
|
||||||
accountID := os.Getenv("CF_ACCOUNT_ID")
|
accountID := strings.TrimSpace(os.Getenv("CF_ACCOUNT_ID"))
|
||||||
apiToken := os.Getenv("CF_API_TOKEN")
|
apiToken := strings.TrimSpace(os.Getenv("CF_API_TOKEN"))
|
||||||
namespace := os.Getenv("KV_NAMESPACE_ID")
|
namespace := strings.TrimSpace(os.Getenv("KV_NAMESPACE_ID"))
|
||||||
|
|
||||||
return accountID, apiToken, namespace
|
return accountID, apiToken, namespace
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user