add ENV config support
This commit is contained in:
parent
0f51dc8115
commit
e20f6a4597
@ -7,6 +7,9 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
viper.SetEnvPrefix("OPENPDU_")
|
||||
viper.AllowEmptyEnv(true)
|
||||
viper.AutomaticEnv()
|
||||
viper.SetConfigName("openpdu") // name of config file (without extension)
|
||||
viper.SetConfigType("yaml")
|
||||
viper.AddConfigPath(".") // optionally look for config in the working directory
|
||||
|
Loading…
Reference in New Issue
Block a user