Don't create a blank template when parsing templates

This created a template with two entries within it; using
template.Execute would execute an empty template when you attempted to
use templates within a sub-directory
This commit is contained in:
Josh Johnson 2017-09-04 17:03:33 -07:00
parent 5acca0500e
commit 94f398c7a7

View File

@ -104,7 +104,7 @@ func processTemplate(params []string, conf *config) (err error) {
log.Printf("process template %s to %s", srcPathAbs, dstPathAbs) log.Printf("process template %s to %s", srcPathAbs, dstPathAbs)
} }
t, err := template.New(srcPath).ParseFiles(srcPathAbs) t, err := template.ParseFiles(srcPathAbs)
if err != nil { if err != nil {
return err return err
} }