From 799eb2dbd027c578b6158f81fef02b53090c7260 Mon Sep 17 00:00:00 2001 From: rishavch2104 Date: Sat, 1 Mar 2025 22:10:47 +0530 Subject: [PATCH] Fix: checking for custom file extension was happening without file type --- file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index 50a4058..bcab3ac 100644 --- a/file.go +++ b/file.go @@ -83,8 +83,8 @@ func (v *Viper) searchInPath(in string) (filename string) { } if v.configType != "" { - if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b { - return filepath.Join(in, v.configName) + if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+v.configType)); b { + return filepath.Join(in, v.configName+"."+v.configType) } }