package
module
Version:
v0.20.2
Opens a new window with list of versions in this module.
Published: Oct 2, 2020
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 40
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 or flag.ErrHelp => 0
errors implementing Coder => value returned by ExitCode
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.