diff --git a/lib/templates/template.go b/lib/templates/template.go index 4346111..1c7b546 100644 --- a/lib/templates/template.go +++ b/lib/templates/template.go @@ -2,7 +2,7 @@ package templates import ( "bytes" - "errors" + "fmt" "io" "net/mail" "os" @@ -190,7 +190,8 @@ func findTemplate(templateName string, templateDirs []string) (string, error) { return templateFile, nil } - return "", errors.New("Can't find template - " + templateName) + return "", fmt.Errorf( + "Can't find template %q in any of %v ", templateName, templateDirs) } func ParseTemplateFromFile(templateName string, templateDirs []string, data interface{}) (io.Reader, error) {