Documentation
¶
Overview ¶
Package exitcode maps errors to the process exit codes documented in `fft help exit-codes`.
Index ¶
Constants ¶
View Source
const ( OK = 0 // success General = 1 // unclassified failure Usage = 2 // bad flags or arguments Config = 3 // no active project, or the config is unusable Auth = 4 // authentication failed (401) Forbidden = 5 // authenticated but not permitted (403) NotFound = 6 // the resource does not exist (404) Conflict = 7 // optimistic-locking version conflict (409) Partial = 8 // a bulk operation succeeded for some items and failed for others Interrupted = 130 )
Exit codes. These are part of the CLI's contract with scripts — changing one is a breaking change.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UsageError ¶
type UsageError struct{ Err error }
UsageError marks an error as a usage problem so cobra's argument and flag validation surfaces as exit code 2 rather than a generic failure.
func (UsageError) Error ¶
func (e UsageError) Error() string
func (UsageError) ExitCode ¶
func (e UsageError) ExitCode() int
func (UsageError) Unwrap ¶
func (e UsageError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.