Documentation
¶
Overview ¶
Package app implements the proteos CLI command tree: argument dispatch, the shared client/credential plumbing, and output helpers. main is a thin wrapper around Run so the whole CLI is testable in-process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
Stdin io.Reader // defaults to nothing read; main wires this to os.Stdin
Stdout io.Writer
Stderr io.Writer
Version string // semantic version, e.g. "v1.2.3" or "dev"
Commit string // git short sha the binary was built from
Date string // build timestamp (RFC 3339, UTC)
// JSON is true when --json appeared anywhere in the invocation. It is
// detected once in Run (before any per-command flag parsing) so every error
// path — including ones before a command's own --json flag is parsed, like a
// missing endpoint/token — can emit the machine-readable envelope instead of
// prose. Commands that also use --json for success output read their own
// parsed flag; this field only governs error formatting.
JSON bool
// contains filtered or unexported fields
}
Env carries the process I/O and build metadata into the command tree, so tests can capture output and drive commands without touching os.Stdout/Args.