forked from spf13/viper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ReadConfigFrom to load config from a struct
In cases where there isn't a configuration file, none of the fields on the struct are bound to environment variables unless BindEnv was explicitly called. AutomaticEnv essentially doesn't work with the config file per spf13#761. If you need to support this scenario, call ReadConfigFrom on the destination struct before calling Unmarshal. Signed-off-by: Carolyn Van Slyck <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 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