From 228bb88a46e707a814750892e060fa8d33bf17d8 Mon Sep 17 00:00:00 2001 From: knqyf263 Date: Thu, 7 Jul 2022 20:15:00 +0300 Subject: [PATCH] fix: capitalize the second param in BindEnv --- viper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/viper.go b/viper.go index a3812e9..22d82d1 100644 --- a/viper.go +++ b/viper.go @@ -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 } }