Documentation
¶
Overview ¶
Package output provides gh-style pretty printing: tables, key-value, JSON, and status messages.
Index ¶
- Variables
- func Bold(msg string)
- func Dim(msg string)
- func Error(msg string)
- func FormatCell(v any) string
- func FormatRelativeTime(s string) string
- func Info(msg string)
- func IsJSON() bool
- func IsTTY() bool
- func JSON(data any)
- func KV(pairs []KVPair)
- func KVWithTitle(pairs []KVPair, title string)
- func OutputDetail(raw any, fields []FieldDef, title string)
- func OutputList(raw any, rows []map[string]any, cols []Column, total, page int)
- func Resolve(m map[string]any, key string) any
- func Success(msg string)
- func Table(rows []map[string]any, cols []Column)
- func TableTo(w io.Writer, rows []map[string]any, cols []Column, emptyMsg string)
- func Warning(msg string)
- func Writer() io.Writer
- type Column
- type FieldDef
- type KVPair
- type Opts
Constants ¶
This section is empty.
Variables ¶
View Source
var Current = &Opts{Format: "table"}
Functions ¶
func FormatCell ¶
func FormatRelativeTime ¶
func KVWithTitle ¶
func OutputDetail ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.