diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-13 22:36:55 +0100 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-13 22:36:55 +0100 |
commit | 3ddece16e4f9561768fe26eb43b052ca80f20004 (patch) | |
tree | d4dd4659daa7858e5023ab411794ffdf623a037b /main.go | |
parent | 0058cd2abaa471379877849740bb9dd0430d21ed (diff) |
Don't panic, forward the error to the caller
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -133,9 +133,10 @@ func execute(cmd *cobra.Command, args []string) error { if err != nil { return err } - out := r.RenderBytes(b) + + out, err := r.RenderBytes(b) fmt.Printf("%s", string(out)) - return nil + return err } func main() { |