You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Viper is great for flexibly handling configurations that are written by some outside means, but it does not provide a means of starting from scratch, nor does it provide the related ability to update a configuration from Go. It would be great to have an API method that, after constructing a configuration programatically, can write the configuration to a file in the desired format. Some issues to overcome:
If values were read in from several layers of configuration files (remote, /etc/..., ~/.config/..., ./...") then it's not obvious how to limit the values written to the file to only the ones explicitly set.
It would probably also be necessary to note if any values have been changed since they were read. GIven the hierarchical nature of configuration sources, this is also not obvious.
Still, it seems like a generally sufficiently useful function to be worth considering.
The text was updated successfully, but these errors were encountered:
Viper is great for flexibly handling configurations that are written by some outside means, but it does not provide a means of starting from scratch, nor does it provide the related ability to update a configuration from Go. It would be great to have an API method that, after constructing a configuration programatically, can write the configuration to a file in the desired format. Some issues to overcome:
Still, it seems like a generally sufficiently useful function to be worth considering.
The text was updated successfully, but these errors were encountered: