Documentation
¶
Overview ¶
Package cli is the cobra command tree. It stays thin: every command parses flags and calls into internal/app and internal/core, so the TUI can call the same functions and the two front-ends cannot drift into two implementations.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitFailure = 1 ExitUsage = 2 ExitNeedsReview = 3 )
Exit codes. These are a contract, not an implementation detail: `check` exiting 1 on a stale pack is what makes it usable as a CI gate, and Click used 2 for a usage error, which anything wrapping the earlier binary may already depend on.
ExitNeedsReview (3) is a sync a guard stopped for a person: it would rename or remove shipped icons. A dry run that would hit the guard exits 3 too, having listed every icon. A failure in the same run wins: 1.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() int
Execute builds the command tree and runs it, returning the process exit code.
func InterruptContext ¶ added in v0.1.1
InterruptContext returns a context cancelled by the first SIGINT, SIGTERM or SIGHUP, so Ctrl-C stops a sync cleanly: the stage in flight sees the cancel, its subprocess or download is stopped, and no later stage (the commit, the push) runs. After the first signal the default handling is restored, so a second Ctrl-C still kills the process outright.