How to resolve toml naming incompatibility with env #1351
-
Hey, thanks for the great library! My question revolves around a legacy app that uses [feature]
is_enabled = true And then in golang I would do something like this: isEnabled := viper.GetBool("feature.is_enabled") What I'd like to do is add an environment variable override using To work around this, I've manually added overrides like so: viper.BindEnv("feature.is_enabled", "FEATURE_IS_ENABLED") But what I'd prefer to do is use Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Take a look at the |
Beta Was this translation helpful? Give feedback.
Take a look at the
SetEnvKeyReplacer
function.