github.com/martinohmann/exit (go): Package exit wrap errors with exit code information and conversely produces meaningful exit codes based on errors.  Errors can be passed to Exit to exit the program with a meaningful exit code based on the kind and type of error:  Alternatively the exit code for an error can be computed via Code and used later:  For more control over the exit code, errors can be wrapped in an ExitError which passes on the desired exit code:  Directly construct an error of type ExitError with a specific exit code or wrap an existing error with more context:  Errors can also be wrapped in a defer statement via Errorp:  Mapping of errors to exit code can also be controlled by setting a custom error handler via SetErrorHandler:
Keywords: errors|exit|golang