summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-12-13 22:36:55 +0100
committerChristian Muehlhaeuser <muesli@gmail.com>2019-12-13 22:36:55 +0100
commit3ddece16e4f9561768fe26eb43b052ca80f20004 (patch)
treed4dd4659daa7858e5023ab411794ffdf623a037b /main.go
parent0058cd2abaa471379877849740bb9dd0430d21ed (diff)
Don't panic, forward the error to the caller
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 1544e88..c4e0060 100644
--- a/main.go
+++ b/main.go
@@ -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() {