package
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Jul 8, 2019
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 43
Opens a new window with list of known importers.
Documentation
¶
Exit is a convenience function that calls os.Exit
with the exit code associated with err.
Get gets the exit code associated with an error. Cases:
nil => 0
errors implementing Coder => value returned by ExitCode
flag.ErrHelp => 2
all other errors => 1
Set wraps an error in a Coder, setting its error code.
type Coder interface {
error
ExitCode() int
}
Coder is an interface to control what value Get returns.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.