summaryrefslogtreecommitdiffstats
path: root/hugolib/config.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-08-02 15:28:43 +0000
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 20:11:51 +0200
commitc577a9ed2347559783c44232e1f08414008c5203 (patch)
tree04cb53ae9303a2b8058f4663220fd8aa842f3f87 /hugolib/config.go
parenta93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c (diff)
Fixed ineffectual assignments
Dropped/fixed ineffectual assignments after static code analysis.
Diffstat (limited to 'hugolib/config.go')
-rw-r--r--hugolib/config.go4
1 files changed, 1 insertions, 3 deletions
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
}
}