Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCompletionHandled = errors.New("completion request handled")
ErrCompletionHandled is returned by Execute when a shell-completion preflight request was fully serviced. main translates it into a zero-exit termination; no command runs. Keeping this as a returned sentinel — rather than an os.Exit deep in construction — leaves main the sole owner of process exit.
Functions ¶
func Execute ¶
Execute builds the runtime and root command for a process invocation, services any shell-completion preflight, applies the optional whole-invocation timeout, and runs the command tree against ctx.
ctx is the root context main owns (signal-aware via signal.NotifyContext). Execute never calls os.Exit: a completion preflight that was fully handled is reported back to main as ErrCompletionHandled.
func ExitCode ¶
ExitCode maps err to its process exit code. It delegates to the central cli.ExitCode mapper so every error type (credential, Jira API, rate-limit, validation, command-local) carries the correct stable code.
func New ¶
New builds a fully assembled root command for the given runtime — the importable entry point used by both cmd/jira (to run) and cmd/gen-docs (to generate reference docs). The bare root plus every command family and the shell completion command. Each call yields an independent command tree with its own flag set and IO wiring — no process-global command state.
Types ¶
This section is empty.