api.NewClient() now uses $VAULT_NAMESPACE as an input. (#6470)

* api.NewClient() now uses $VAULT_NAMESPACE as an input.

* Remove bogus comments.
This commit is contained in:
ncabatoff
2019-03-25 14:23:59 -04:00
committed by Brian Kassouf
parent 54385e9a93
commit 13f8298a30
2 changed files with 32 additions and 0 deletions

View File

@@ -422,6 +422,10 @@ func NewClient(c *Config) (*Client, error) {
client.token = token
}
if namespace := os.Getenv(EnvVaultNamespace); namespace != "" {
client.SetNamespace(namespace)
}
return client, nil
}