aboutsummaryrefslogtreecommitdiffstats
path: root/util.go
diff options
context:
space:
mode:
authorPetter Rasmussen2016-01-17 23:12:26 +0100
committerPetter Rasmussen2016-01-17 23:12:26 +0100
commitd4d1b00c9609a4d493f79bdd74bae5dc60d37ed7 (patch)
treef54e38bf8654ce3deab9691acbfe3df6a5d438da /util.go
parentc88aba0d9b14777be0915541503ca0e1a7936f67 (diff)
downloadgdrive-d4d1b00c9609a4d493f79bdd74bae5dc60d37ed7.tar.bz2
Return error
Diffstat (limited to 'util.go')
-rw-r--r--util.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/util.go b/util.go
index 7f43bd2..4416696 100644
--- a/util.go
+++ b/util.go
@@ -27,3 +27,10 @@ func ExitF(format string, a ...interface{}) {
fmt.Println("")
os.Exit(1)
}
+
+func checkErr(err error) {
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
+}