diff options
Diffstat (limited to 'lib/templates/template.go')
-rw-r--r-- | lib/templates/template.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/templates/template.go b/lib/templates/template.go index 6d66d8eb..9c71c463 100644 --- a/lib/templates/template.go +++ b/lib/templates/template.go @@ -227,3 +227,11 @@ func ParseTemplateFromFile(templateName string, templateDirs []string, data inte } return &body, nil } + +func CheckTemplate(templateName string, templateDirs []string) error { + if templateName != "" { + _, err := ParseTemplateFromFile(templateName, templateDirs, DummyData()) + return err + } + return nil +} |