Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitHandler ¶
func ExitHandler(err error)
ExitHandler converts errors that urfave/cli did not handle into a nicely printed message, and an appropriate os.Exit call to ensure this func never returns from either branch.
This should be used instead of an in-CLI ExitErrHandler, as using that still leaves a dangling `err` return value from *cli.App.Run(), which is awkward in a number of ways.
func Problem ¶
Problem returns a typed error that will report this message "nicely" to the user if it exits the CLI app. The message will be used as the top-level "Error: ..." string regardless of where in the error stack it is, and other wrapped errors will be printed line by line beneath it.
Nested Problem messages will nest structurally, like:
Error: msg Details: some error some other error Error: message ErrorDetails: more nested errors
Types ¶
This section is empty.