templates: better error message
This commit is contained in:
parent
f6a0eb8e14
commit
a9ae91c2d8
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue