fix: capitalize the second param in BindEnv

This commit is contained in:
knqyf263 2022-07-07 20:15:00 +03:00
parent 0add84cdf2
commit 228bb88a46

View file

@ -1286,7 +1286,7 @@ func (v *Viper) find(lcaseKey string, flagDefault bool) interface{} {
envkeys, exists := v.env[lcaseKey]
if exists {
for _, envkey := range envkeys {
if val, ok := v.getEnv(envkey); ok {
if val, ok := v.getEnv(strings.ToUpper(envkey)); ok {
return val
}
}