From c577a9ed2347559783c44232e1f08414008c5203 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 2 Aug 2019 15:28:43 +0000 Subject: Fixed ineffectual assignments Dropped/fixed ineffectual assignments after static code analysis. --- hugolib/config.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hugolib/config.go') diff --git a/hugolib/config.go b/hugolib/config.go index 8c2e44c10..38cf6c3c1 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -256,8 +256,7 @@ func (l configLoader) loadConfig(configName string, v *viper.Viper) (string, err } var filename string - fileExt := helpers.ExtNoDelimiter(configName) - if fileExt != "" { + if helpers.ExtNoDelimiter(configName) != "" { exists, _ := helpers.Exists(baseFilename, l.Fs) if exists { filename = baseFilename @@ -268,7 +267,6 @@ func (l configLoader) loadConfig(configName string, v *viper.Viper) (string, err exists, _ := helpers.Exists(filenameToCheck, l.Fs) if exists { filename = filenameToCheck - fileExt = ext break } } -- cgit v1.2.3