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
I have a question about best practices for loading multiple configuration files with different names. First, I want to load a config file at ~/.config/demo/config.yaml and if that file doesn't exist, I want to fall back to ~/.demo.yaml. How can I solve this since I can only assign a name with viper.SetConfigName(“config”) which is loaded
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a question about best practices for loading multiple configuration files with different names. First, I want to load a config file at
~/.config/demo/config.yaml
and if that file doesn't exist, I want to fall back to~/.demo.yaml
. How can I solve this since I can only assign a name withviper.SetConfigName(“config”)
which is loadedBeta Was this translation helpful? Give feedback.
All reactions