summaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-01-25 21:14:06 -0500
committerGitHub <noreply@github.com>2024-01-25 21:14:06 -0500
commit2cc314740e4ce29739c667f0887448d6ee592542 (patch)
tree93e6768da61b137e95a1079e775117c238146a24 /template.go
parent562bcd95dfb6fb14af7e0b5829beccff3636d2f1 (diff)
Revert "Remove support for deprecated key/value array form of template config" (#1979)
Diffstat (limited to 'template.go')
-rw-r--r--template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/template.go b/template.go
index 2705e7de..8c0aa64a 100644
--- a/template.go
+++ b/template.go
@@ -49,7 +49,7 @@ func copyFuncMap(funcMap template.FuncMap) template.FuncMap {
}
// parseTemplate - parses text as a Go template with the given name and options
-func parseTemplate(ctx context.Context, name, text string, funcs template.FuncMap, tmplctx interface{}, nested map[string]config.DataSource, leftDelim, rightDelim string, missingKey string) (tmpl *template.Template, err error) {
+func parseTemplate(ctx context.Context, name, text string, funcs template.FuncMap, tmplctx interface{}, nested config.Templates, leftDelim, rightDelim string, missingKey string) (tmpl *template.Template, err error) {
tmpl = template.New(name)
if missingKey == "" {
missingKey = "error"
@@ -81,7 +81,7 @@ func parseTemplate(ctx context.Context, name, text string, funcs template.FuncMa
return tmpl, nil
}
-func parseNestedTemplates(ctx context.Context, nested map[string]config.DataSource, tmpl *template.Template) error {
+func parseNestedTemplates(ctx context.Context, nested config.Templates, tmpl *template.Template) error {
fsp := datafs.FSProviderFromContext(ctx)
for alias, n := range nested {