Return potential error from ioutil.ReadAll

This commit is contained in:
Christian Muehlhaeuser 2019-12-06 18:10:51 +01:00
parent 292f06052f
commit 37c9cfad80

View file

@ -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()) {