Documentation
¶
Index ¶
Constants ¶
View Source
const ExitHandlerPanicMessage = "At least one exit handler vetoed to exit program execution"
Variables ¶
This section is empty.
Functions ¶
func ClearExitHandler ¶
func ClearExitHandler()
ClearExitHandler clears all registered exit handlers
func RegisterExitHandler ¶
func RegisterExitHandler(exitHandler exitHandlerFunc)
Register registers an exit handler function which is run when WithoutMessage is called
func WithMessage ¶
WithMessage 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 WithoutMessage ¶
func WithoutMessage(code int)
WithoutMessage runs all registered exit handlers and then exits the program with the specified exit code using os.Exit.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.