This commit is contained in:
Faissal Elamraoui 2017-04-19 13:42:09 +00:00 committed by GitHub
commit 5817059a4e

View file

@ -63,6 +63,7 @@ func initConfig() {
viper.SetConfigName(".cobra") // name of config file (without extension) viper.SetConfigName(".cobra") // name of config file (without extension)
viper.AddConfigPath("$HOME") // adding home directory as first search path viper.AddConfigPath("$HOME") // adding home directory as first search path
viper.AddConfigPath(".") // optionally look for config in working directory
viper.AutomaticEnv() // read in environment variables that match viper.AutomaticEnv() // read in environment variables that match
// If a config file is found, read it in. // If a config file is found, read it in.