From 252f05877cb76ced8c6d3d5c989a528e3087da6c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 4 Oct 2025 16:38:32 -0500 Subject: GoodExit() --- exit.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'exit.go') 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) -- cgit v1.2.3