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:
parent
5acca0500e
commit
94f398c7a7
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user