1
0
Fork 0
mirror of https://github.com/spf13/viper synced 2025-08-21 10:01:53 +00:00

fixed searchInPath matching file without extension

This commit is contained in:
rishavchaudharyi 2025-03-01 20:34:00 +05:30
commit 947677093a

View file

@ -83,8 +83,8 @@ func (v *Viper) searchInPath(in string) (filename string) {
} }
if v.configType != "" { if v.configType != "" {
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b { if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+v.configType)); b {
return filepath.Join(in, v.configName) return filepath.Join(in, v.configName+"."+v.configType)
} }
} }