dati

A Go library/binary to parse & execute data against template langauges.
git clone git://src.gearsix.net/dati
Log | Files | Refs | Atom | README | LICENSE

commit e03c87039a76d57a137859428f9fcfd3de5b5956
parent d6cfc49d60a80f4358a2f3f1dbd4b6970c7f0ee1
Author: gearsix <gearsix@tuta.io>
Date:   Tue,  6 Jul 2021 11:13:38 +0100

added .Source to suti.Template

Diffstat:
Mtemplate.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/template.go b/template.go @@ -36,6 +36,7 @@ func getTemplateType(path string) string { // Template is a generic interface to any template parsed from LoadTemplateFile type Template struct { + Source string Template interface{} } @@ -180,7 +181,7 @@ func LoadTemplateFile(root string, partials ...string) (t Template, e error) { } if e == nil { - t = Template{} + t = Template{Source: root} ttype := getTemplateType(root) if ttype == "tmpl" || ttype == "gotmpl" { t.Template, e = loadTemplateFileTmpl(root, partials...)