diff options
Diffstat (limited to 'cmd/util/exit.go')
-rw-r--r-- | cmd/util/exit.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/util/exit.go b/cmd/util/exit.go new file mode 100644 index 00000000..96fcbf3c --- /dev/null +++ b/cmd/util/exit.go @@ -0,0 +1,11 @@ +package util + +import ( + "os" +) + +// ExitWithError prints error and exits with error code`. +func ExitWithError(err error) { + Panicf("<red+hb>Error:</reset> <red>%s</reset>\n", err) + os.Exit(1) +} |