Documentation
¶
Overview ¶
Package exitcode defines the mkit CLI exit-code contract and maps errors to exit codes. Keep in sync with the root command help text in cmd/mkit/main.go.
Index ¶
Constants ¶
View Source
const ( // Success means the command completed without error. Success = 0 // PolicyDeny means a governance policy blocked the requested action. PolicyDeny = 1 // Usage means the command was invoked with invalid flags or arguments. Usage = 2 // Runtime means the command failed for an operational reason // (I/O, engine, provider failures). Runtime = 3 )
mkit exit codes. Documented in the root command help.
Variables ¶
This section is empty.
Functions ¶
func IsUsageError ¶
IsUsageError reports whether err was caused by invalid CLI usage.
func UsageErrorf ¶
UsageErrorf returns an error that maps to the Usage exit code.
Types ¶
type UsageError ¶
type UsageError struct {
Err error
}
UsageError marks errors caused by invalid CLI usage (bad flags or arguments). The CLI exits with code Usage for these.
func (*UsageError) Error ¶
func (e *UsageError) Error() string
func (*UsageError) Unwrap ¶
func (e *UsageError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.