From 70cc182bf17c5e0a67dd8804514eb69a94e6c68b Mon Sep 17 00:00:00 2001 From: adnano Date: Thu, 13 May 2021 23:56:52 -0400 Subject: [PATCH] templates: Return error from LoadTemplate --- templates.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates.go b/templates.go index 6e34631..b4012ef 100644 --- a/templates.go +++ b/templates.go @@ -119,7 +119,9 @@ func (t *Templates) Load(dir string, exts []string) error { } if d.Type().IsRegular() { name := strings.TrimPrefix(path, dir) - t.LoadTemplate(name, path) + if err := t.LoadTemplate(name, path); err != nil { + return err + } } return nil })