Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Blue = color.New(color.FgHiBlue).SprintFunc() Green = color.New(color.FgHiGreen).SprintFunc() Dim = color.New(color.FgHiBlack).SprintFunc() )
Terminal colors used across table, detail, and custom output. fatih/color auto-disables when stdout is not a TTY or NO_COLOR is set.
View Source
var Out io.Writer = os.Stdout
Out is the writer used by Print/PrintRaw. Tests swap this to a bytes.Buffer.
Functions ¶
func PrintDetail ¶
PrintDetail writes a vertical key-value layout to w. Labels are right-padded to align values. Empty values are skipped.
func PrintRaw ¶
func PrintRaw(data json.RawMessage) error
PrintRaw prints raw JSON to Out (used when --format json and we have raw API data).
func RelativeTime ¶ added in v0.2.1
RelativeTime converts an ISO timestamp to a short human-readable string like "2m ago", "3h ago", "5d ago". Returns the original string on parse failure.
Types ¶
type CSVFormatter ¶
type CSVFormatter struct{}
type JSONFormatter ¶
type JSONFormatter struct{}
Click to show internal directories.
Click to hide internal directories.