Documentation
¶
Overview ¶
Package cli wires the command tree, owns the process exit code, and is the only place that decides what reaches stdout and what reaches stderr.
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 ExitFailure = 1 ExitUsage = 2 ExitPartial = 3 ExitSignal = 130 )
Exit codes. A run that reached every controller and rendered its rows exits 0 even when there were no rows, because an empty result is a normal answer.
Variables ¶
View Source
var ErrUsage = errors.New("invalid usage")
ErrUsage marks a fault in what the operator asked for: a flag that does not parse, an unknown command, a rejected value, or a configuration file that cannot be read. Everything wrapping it exits 2.
Functions ¶
func Run ¶
Run executes the CLI and returns the process exit code, and owns the signal context because main exits through os.Exit.
Types ¶
Click to show internal directories.
Click to hide internal directories.