Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatText = "text" FormatJSON = "json" FormatTOON = "toon" )
FormatText, FormatJSON, and FormatTOON are the canonical format names used as registry keys and CLI flag values. Keep this list in sync with registry.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Color bool
OSC8 bool
LatencyMs int
// ShowStats toggles the compact stats footer ("Nms · ● Npt · N remaining").
// Off by default: the line is noise for the common case and always visible
// via `gh prs --stats`. Only consulted by the text formatter; machine
// formats (json, toon) always emit RateLimit as a structured field.
ShowStats bool
// FilterLabel is a short human-readable summary of the active filters for
// display in the repo header (e.g. "@alice, @bob"). An empty string means
// "no override" — the header falls back to showing the viewer's real login.
// Populated by filter.Set.Label() in the CLI layer; the render package has
// no knowledge of the filter package.
FilterLabel string
// AuthorOrder is the ordered list of author logins from the --author flags.
// When len > 1, the text formatter groups PRs into per-author sections.
// The sentinel "@me" is resolved to repo.ViewerLogin at render time.
// Single-author and no-author invocations (len <= 1) use the flat layout.
AuthorOrder []string
}
type Formatter ¶
Formatter renders a fetched repo into its target output form. Implementations return (output, nil) on success. A non-nil error indicates an encoder failure the caller must surface — the output string is then undefined and must not be written to stdout.
Click to show internal directories.
Click to hide internal directories.