Documentation
¶
Overview ¶
Package cli builds the fxvcs command tree. Commands are presentation adapters: they parse flags, call a typed SDK operation, render the result (human or --json), and choose an exit code. No business logic lives here.
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 ExitFailure = 1 ExitUsage = 2 ExitUpgradeRequired = 3 ExitNotImplemented = 4 ExitBusy = 5 )
Exit codes are part of the automation contract.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
Stdout io.Writer
Stderr io.Writer
Stdin io.Reader
// Getwd resolves the working directory (defaults to os.Getwd).
Getwd func() (string, error)
// IsTerminal decides whether a writer is an interactive terminal
// (defaults to a character-device check). Tests set it to force the
// live-progress and colour paths on.
IsTerminal func(io.Writer) bool
// Extra registers additional top-level commands (filter/diff/merge drivers,
// spikes) supplied by other packages so this package has no dependency on
// their engines.
Extra []*cli.Command
}
Env carries process I/O so tests can drive the app without a real terminal.
type VerbatimError ¶
type VerbatimError struct{ Err error }
VerbatimError marks an error whose message must reach the user unchanged (Git-facing driver output, whose wording other tooling may match).
func (VerbatimError) Error ¶
func (e VerbatimError) Error() string
Error returns the wrapped message.
func (VerbatimError) Unwrap ¶
func (e VerbatimError) Unwrap() error
Unwrap exposes the wrapped error for errors.Is/As.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package drivers registers the Git process-boundary entry points (filter-process, diff-driver, merge-driver) and spike commands with the CLI.
|
Package drivers registers the Git process-boundary entry points (filter-process, diff-driver, merge-driver) and spike commands with the CLI. |
|
Package ui is the presentation layer of the fxvcs CLI: headers, footers, aligned tables, item rows with a state word (and an optional symbol on a terminal), hints, byte formatting, and plural helpers.
|
Package ui is the presentation layer of the fxvcs CLI: headers, footers, aligned tables, item rows with a state word (and an optional symbol on a terminal), hints, byte formatting, and plural helpers. |
|
live
Package live is the interactive progress view: a bounded, in-place display of an operation that touches many files.
|
Package live is the interactive progress view: a bounded, in-place display of an operation that touches many files. |
Click to show internal directories.
Click to hide internal directories.