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,8 +1,8 @@
package cmd
import (
"fmt"
"io"
"log"
"os"
"strings"
@@ -32,8 +32,7 @@ var SetCmd = &cobra.Command{
}
if err := client.SetData(dataURL, handler, args[0], r); err != nil {
os.Stderr.WriteString(fmt.Sprintf("%v\n", err))
os.Exit(1)
log.Fatal(err)
}
},
}