Use nil value variable declaration

This commit is contained in:
Duncan Mac-Vicar P 2019-10-17 15:06:26 +02:00
parent 19b0e4054c
commit cb23e03ea4

View file

@ -1874,7 +1874,7 @@ func (v *Viper) getConfigFile() (string, error) {
func (v *Viper) searchInPath(in string) (filename string) { func (v *Viper) searchInPath(in string) (filename string) {
jww.DEBUG.Println("Searching for config in ", in) jww.DEBUG.Println("Searching for config in ", in)
for _, ext := range SupportedExts { for _, ext := range SupportedExts {
configFilePlusExt := "" var configFilePlusExt string
if ext != "" { if ext != "" {
configFilePlusExt = v.configName + "." + ext configFilePlusExt = v.configName + "." + ext
} else { } else {