Documentation ¶
Index ¶
Constants ¶
View Source
const ExitHandlerPanicMessage = "At least on exit handler vetoed to exit program execution"
Variables ¶
This section is empty.
Functions ¶
func ClearExitHandler ¶
func ClearExitHandler()
ClearExitHandler clears all registered exit handlers
func Exit ¶
func Exit(code int)
Exit runs all registered exit handlers and then exits the program with the specified exit code using os.Exit.
func ExitWithMessage ¶
ExitWithMessage runs all registered exit handlers, prints the specified message and then exits the program with the specified exit code. If the exit code is 0, the message is prints to stdout, otherwise to stderr.
func RegisterExitHandler ¶
Register registers an exit handler function which is run when Exit is called
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.