Documentation
¶
Overview ¶
Package output renders command results as a human table or as machine JSON or YAML, selected by the --format flag. Agents pass --format json for a stable, parseable surface.
Index ¶
- func Blue(s string) string
- func Bold(s string) string
- func Check() string
- func Emit(format string, v interface{}, tableFn func() Table) error
- func Green(s string) string
- func Slate(s string) string
- func Str(m map[string]interface{}, key string) string
- func Success(w io.Writer, format string, a ...interface{})
- func Wordmark() string
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶ added in v0.12.0
func Check() string
Check returns a light brand-green check mark (plain ASCII when colour is off).
func Emit ¶
Emit writes v in the requested format. For "table" it calls tableFn to build the columns; for "json"/"yaml" it marshals v directly. tableFn may be nil when only structured output makes sense.
func Green ¶ added in v0.12.0
Green/Blue/Slate/Bold colourise a string for human terminals (no-ops when colour is disabled).
Types ¶
Click to show internal directories.
Click to hide internal directories.