summaryrefslogtreecommitdiffstats
path: root/hugolib/config.go
diff options
context:
space:
mode:
authorAnton Harniakou <anton.harniakou@gmail.com>2019-01-31 15:06:18 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-02-01 07:17:37 +0100
commitd9282cf98a346fcf98f363d9c353e4920ca85fc7 (patch)
tree440d1c8d3d5fc49f93c2df814003b75e84965ad6 /hugolib/config.go
parentc52045bbb38cbf64b9cb39352230060aa122cc9f (diff)
Store supported config formats in a variable
Diffstat (limited to 'hugolib/config.go')
-rw-r--r--hugolib/config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/config.go b/hugolib/config.go
index 504043d79..5b56333df 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -202,7 +202,7 @@ func (l configLoader) loadConfig(configName string, v *viper.Viper) (string, err
filename = baseFilename
}
} else {
- for _, ext := range []string{"toml", "yaml", "yml", "json"} {
+ for _, ext := range config.ValidConfigFileExtensions {
filenameToCheck := baseFilename + "." + ext
exists, _ := helpers.Exists(filenameToCheck, l.Fs)
if exists {