-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AllKeys() includes all keys / AllSettings() includes overridden neste…
…d values * Function AllKeys() now returns all keys holding a value (for nested values, the nested key is the full path, i.e., a sequence of dot-separated keys). Previously, returned only depth-1 keys, as well as flags and environment variables: this is more generic and may be used widely. Besides, it takes into account shadowed keys (key ignored if shadowed by a path at a higher-priority level). * Function AllSettings() now returns nested maps for all keys holding a value, as specified by AllKeys(). The value stored in the map is the one with highest priority, as returned by the Get() function (taking into account aliases, environment variables, flags, etc.). This fixes Unmarshal(): it fills in correct values for nested configuration elements overridden by flags or env variables. + tests fixed accordingly + test added to TestShadowedNestedValue(), to test Unmarshalling of shadowed keys
- Loading branch information
1 parent
59609bb
commit 74f9cd8
Showing
2 changed files
with
105 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters