diff --git a/src/config/config.go b/src/config/config.go index 7ab4158..69d7482 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -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