From 94f398c7a7e7bb0672513f649227abcbad3bea8b Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Mon, 4 Sep 2017 17:03:33 -0700 Subject: [PATCH] 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 --- template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.go b/template.go index 5bea7d4..002386f 100644 --- a/template.go +++ b/template.go @@ -104,7 +104,7 @@ func processTemplate(params []string, conf *config) (err error) { log.Printf("process template %s to %s", srcPathAbs, dstPathAbs) } - t, err := template.New(srcPath).ParseFiles(srcPathAbs) + t, err := template.ParseFiles(srcPathAbs) if err != nil { return err }