diff options
| -rw-r--r-- | auto.proto | 2 | ||||
| -rw-r--r-- | exit.go | 20 |
2 files changed, 21 insertions, 1 deletions
@@ -28,5 +28,5 @@ message Auto { // `autogenpb:marshal` ` message Autos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex` string uuid = 1; // `autogenpb:uuid:94210ebf-a534-4b33-aadd-2f5e1f56ae38` string version = 2; // `autogenpb:version:v0.0.1` - repeated Auto autos = 3; // THIS MUST BE HttpRequest and then HttpRequests + repeated Auto autos = 3; } @@ -0,0 +1,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) +} |
