Minor fixes on error handling

Co-authored-by: César Gallego <gallego.cesar@gmail.com>
This commit is contained in:
pancho horrillo
2019-10-17 17:11:19 +02:00
parent ee00a7bccc
commit b14ea93a64
4 changed files with 9 additions and 14 deletions
+2 -3
View File
@@ -1,7 +1,7 @@
package cmd
import (
"fmt"
"log"
"os"
"github.com/spf13/cobra"
@@ -22,8 +22,7 @@ var GetCmd = &cobra.Command{
err := client.GetData(dataURL, handler, args[0], os.Stdout)
if err != nil {
os.Stderr.WriteString(fmt.Sprintf("%v\n", err))
os.Exit(1)
log.Fatal(err)
}
},
}