Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
WrapSystem returns an error wrapping msg with a SystemError sentinel. Use IsSystem to test whether an error (or any error in its chain) is a SystemError.
Types ¶
type SystemError ¶
type SystemError struct {
Msg string
}
SystemError is a sentinel error type for system-level failures that should result in exit code 3. These include config file permission errors, network timeouts, and other infrastructure-level problems (as opposed to user errors which return exit code 1 or 2).
func (*SystemError) Error ¶
func (e *SystemError) Error() string
type UsageError ¶
type UsageError struct {
Err error
}
UsageError is a sentinel error type for usage errors that should result in exit code 2. These include unknown flags, unknown subcommands, and other command-line syntax errors (as opposed to runtime errors which return exit code 1).
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.