From: Scott C Wilson Date: Mon, 20 Jul 2015 01:02:03 +0000 (-0400) Subject: On error, return error message, not nil X-Git-Tag: v0.15~278 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8a48412c44012e66628f1ca54ebade0321d556a7;p=brevno-suite%2Fhugo On error, return error message, not nil --- diff --git a/tpl/template.go b/tpl/template.go index 357a9fbd..97a04344 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -197,7 +197,7 @@ func (t *GoHTMLTemplate) AddTemplateFile(name, baseTemplatePath, path string) er compiler := amber.New() // Parse the input file if err := compiler.ParseFile(path); err != nil { - return nil + return err } if _, err := compiler.CompileWithTemplate(t.New(templateName)); err != nil {