summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-12-06 18:10:51 +0100
committerChristian Muehlhaeuser <muesli@gmail.com>2019-12-06 18:10:51 +0100
commit37c9cfad80c9c0f549b5d42d4bcbb749c25330bd (patch)
tree0f3f00c795a36b0968ede68728f7c617132e0479 /main.go
parent292f06052f456c02f369c96ceb935aff223d766b (diff)
Return potential error from ioutil.ReadAll
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index 1c1fb7f..26e03d0 100644
--- a/main.go
+++ b/main.go
@@ -100,7 +100,10 @@ func execute(cmd *cobra.Command, args []string) error {
return err
}
defer src.reader.Close()
- b, _ := ioutil.ReadAll(src.reader)
+ b, err := ioutil.ReadAll(src.reader)
+ if err != nil {
+ return err
+ }
r := gold.NewPlainTermRenderer()
if isatty.IsTerminal(os.Stdout.Fd()) {