Use updated go-flags version for env-namespace support

+ fix docs
This commit is contained in:
Thom Seddon
2019-05-07 10:39:29 +01:00
parent dd13f42ddf
commit b0e4b6333d
4 changed files with 9 additions and 5 deletions

View File

@ -181,10 +181,12 @@ func TestConfigFileBackwardsCompatability(t *testing.T) {
func TestConfigParseEnvironment(t *testing.T) {
assert := assert.New(t)
os.Setenv("COOKIE_NAME", "env_cookie_name")
os.Setenv("PROVIDERS_GOOGLE_CLIENT_ID", "env_client_id")
c, err := NewConfig([]string{})
assert.Nil(err)
assert.Equal("env_cookie_name", c.CookieName, "variable should be read from environment")
assert.Equal("env_client_id", c.Providers.Google.ClientId, "namespace variable should be read from environment")
}
func TestConfigTransformation(t *testing.T) {