catching template execute error

This commit is contained in:
jackspirou 2015-11-20 19:10:08 -06:00
parent e155afd963
commit 5a516ac3f7
1 changed files with 1 additions and 2 deletions

View File

@ -64,8 +64,7 @@ func main() {
os.Exit(1)
}
t.Execute(buf, &data)
if err != nil {
if err := t.Execute(buf, &data); err != nil {
fmt.Printf("Error executing content template. %s\n", err)
os.Exit(1)
}