summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exit.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/exit.go b/exit.go
index 3581330..b718a94 100644
--- a/exit.go
+++ b/exit.go
@@ -10,6 +10,12 @@ import (
// initializes logging and command line options
+func (pb *Auto) GoodExit(msg string) {
+ dur := time.Since(pb.Ctime.AsTime())
+ log.Infof("%s: %s (%s)\n", pb.Argname, msg, shell.FormatDuration(dur))
+ os.Exit(-1)
+}
+
func (pb *Auto) BadExit(msg string, err error) {
if err != nil {
log.Info(err)