templates: Return error from LoadTemplate

This commit is contained in:
adnano 2021-05-13 23:56:52 -04:00
parent b6614b71da
commit 70cc182bf1

View file

@ -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
})