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 ¶
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: an empty fleet is a normal answer.
Variables ¶
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.
func RunWith ¶ added in v0.2.0
RunWith is Run against caller-supplied streams, which is how the tests drive the real command tree.