Replace '-' with '_'

This commit is contained in:
mngshm
2025-04-01 12:04:42 +05:30
parent 0ab2e2834a
commit 28295e2b83

View File

@@ -40,6 +40,7 @@ func ConfigureViper(environment string) error {
viper.SetEnvPrefix("ENTE")
// Ask Viper to look for underscores (instead of dots) for nested configs.
viper.SetEnvKeyReplacer(strings.NewReplacer(`.`, `_`))
viper.SetEnvKeyReplacer(strings.NewReplacer(`-`, `_`))
viper.SetConfigFile("configurations/" + environment + ".yaml")
err := viper.ReadInConfig()