Allow setting the delimiter used for setting config via OS env, e.g. HUGO_

Fixes #7829
This commit is contained in:
Bjørn Erik Pedersen
2020-11-24 14:11:42 +01:00
parent 8a6e706053
commit 7e223b3baa
4 changed files with 53 additions and 24 deletions

View File

@@ -84,7 +84,7 @@ func GetNestedParam(keyStr, separator string, candidates ...Params) (interface{}
}
func GetNestedParamFn(keyStr, separator string, lookupFn func(key string) interface{}) (interface{}, string, map[string]interface{}, error) {
keySegments := strings.Split(strings.ToLower(keyStr), separator)
keySegments := strings.Split(keyStr, separator)
if len(keySegments) == 0 {
return nil, "", nil, nil
}