Skip to content

Commit

Permalink
Document the new ExcludeMeta flag in vault example.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed May 24, 2023
1 parent 16aac23 commit 5dceb97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/read-vault/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ func main() {
Token: os.Getenv("VAULT_TOKEN"),
Path: "secret/data/my-app",
Timeout: 10 * time.Second,

// If this is set to false, then `data` and `metadata` keys
// from Vault are fetched. All config is then accessed as
// k.String("data.YOUR_KEY") etc. instead of k.String("YOUR_KEY").
ExcludeMeta: true,
})
// Load mapped config from Vault storage.
if err := k.Load(provider, nil); err != nil {
Expand Down

0 comments on commit 5dceb97

Please sign in to comment.