mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Store supported config formats in a variable
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
c52045bbb3
commit
d9282cf98a
@@ -20,6 +20,10 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var (
|
||||
ValidConfigFileExtensions = []string{"toml", "yaml", "yml", "json"}
|
||||
)
|
||||
|
||||
// FromConfigString creates a config from the given YAML, JSON or TOML config. This is useful in tests.
|
||||
func FromConfigString(config, configType string) (Provider, error) {
|
||||
v := newViper()
|
||||
|
Reference in New Issue
Block a user