Documentation
¶
Overview ¶
Package execution provides error types and status codes for command execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorType ¶
type ErrorType int
ErrorType is the type of the error that can generate a specific exit status.
type ExitError ¶
type ExitError struct {
// contains filtered or unexported fields
}
ExitError is a special Error that is raised when special conditions require imp to exit with a specific errorCode. If this error is returned and/or properly wrapped, it will reach the main function. In the main, the exitCode will be set as the exit code of the execution.
type UsageError ¶ added in v0.8.0
type UsageError struct {
// contains filtered or unexported fields
}
UsageError identifies invalid flags, arguments or configuration.
func NewUsageError ¶ added in v0.8.0
func NewUsageError(err error) *UsageError
NewUsageError wraps an error with the invalid-usage exit code.
func (*UsageError) Error ¶ added in v0.8.0
func (e *UsageError) Error() string
func (*UsageError) ExitCode ¶ added in v0.8.0
func (*UsageError) ExitCode() int
ExitCode returns the standard invalid-usage exit code.
func (*UsageError) Unwrap ¶ added in v0.8.0
func (e *UsageError) Unwrap() error
Unwrap exposes the original validation error.