1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
package prep import ( "os" "time" "go.wit.com/lib/gui/shell" "go.wit.com/log" ) // initializes logging and command line options func (pb *Auto) BadExit(msg string, err error) { if err != nil { log.Info(err) } dur := time.Since(pb.Ctime.AsTime()) log.Infof("%s: %s (%s)\n", pb.Argname, msg, shell.FormatDuration(dur)) os.Exit(-1) }