Skip to content

Commit

Permalink
Don't swallow execution errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Smith committed Nov 29, 2016
1 parent ab65bb0 commit 4574ec8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "bytes"
import "errors"
import "io"
import "os"
import "log"
import "text/template"
import "strings"

Expand All @@ -30,9 +31,12 @@ func WriteTemplateToStream(tplSource string, environ map[string]string, outStrea
})
_, err := tpl.Parse(tplSource)
if err != nil {
panic(err)
log.Fatal(err)
}
err = tpl.Execute(outStream, environ)
if err != nil {
log.Fatal(err)
}
tpl.Execute(outStream, environ)
}

func TplSplitStr(args ...interface{}) ([]string, error) {
Expand Down

0 comments on commit 4574ec8

Please sign in to comment.