diff options
| -rw-r--r-- | argv.Exit.go | 8 | ||||
| -rw-r--r-- | theMagicOfAutocomplete.go | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/argv.Exit.go b/argv.Exit.go index bbf5c70..c2f33cb 100644 --- a/argv.Exit.go +++ b/argv.Exit.go @@ -15,6 +15,14 @@ import ( // also, it supports a custom Exit() back to your application +func GoodExit(msg string) { + me.pb.GoodExit(msg) +} + +func BadExit(msg string, err error) { + me.pb.BadExit(msg, err) +} + func (pb *Argv) GoodExit(msg string) { go ExitWatchdog() if me.appExit != nil { diff --git a/theMagicOfAutocomplete.go b/theMagicOfAutocomplete.go index 592e765..e8e4594 100644 --- a/theMagicOfAutocomplete.go +++ b/theMagicOfAutocomplete.go @@ -72,7 +72,7 @@ func Autocomplete(dest any) *Argv { all := NewArgvs() // initializes the application config file - ENV.Init(me.pb.AppInfo.APPNAME, me.pb.AppInfo.VERSION, cobol.Time(me.pb.AppInfo.BUILDTIME), me.pb.Real) + ENV.Init(me.pb.AppInfo.APPNAME, me.pb.AppInfo.VERSION, cobol.Time(me.pb.AppInfo.BUILDTIME), me.pb.Real, GoodExit, BadExit) // loads the autocomplete history file err := config.LoadCache(all, "argv", me.pb.AppInfo.APPNAME) // |
