-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
in cli.go
var exiter = func(code int) {
os.Exit(code)
}
It would be great is this variable is exported so it can be overridden with a custom func
var Exiter = func(code int) {
os.Exit(code)
}
The reason I need this is because I do some initialization (e.g. open DB & log) in my application before I call cli Run
It the cmdline parameters are not complete... help is displayed BUT the After func is not called (so I can't do it there)
I need to to override the exiter to finalize my application (e.g. close the DB connection & log)
The egs are just hypothetical examples but should convey the basic idea
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels