From 5a516ac3f7185adc62c1ff44689e76b54e645205 Mon Sep 17 00:00:00 2001 From: jackspirou Date: Fri, 20 Nov 2015 19:10:08 -0600 Subject: [PATCH] catching template execute error --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index bebb9b9..67e7e96 100644 --- a/main.go +++ b/main.go @@ -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) }