Versions in this module Expand all Collapse all v0 v0.1.1 Jun 10, 2026 v0.1.0 Feb 4, 2026 Changes in this version + func IsColorEnabled(mode string) bool + func SimpleTable(w io.Writer, headers []string, rows [][]string) error + func WithMode(ctx context.Context, mode Mode) context.Context + func WriteJSON(w io.Writer, v any) error + func WriteTSV(w io.Writer, headers []string, rows [][]string) error + type Colors struct + func NewColors(mode string) *Colors + func (c *Colors) Bold(s string) string + func (c *Colors) Cyan(s string) string + func (c *Colors) Dim(s string) string + func (c *Colors) Enabled() bool + func (c *Colors) Error(s string) string + func (c *Colors) Magenta(s string) string + func (c *Colors) Success(s string) string + func (c *Colors) Warning(s string) string + type Formatter struct + Mode Mode + Writer io.Writer + func NewFormatter(w io.Writer, mode Mode) *Formatter + func (f *Formatter) Output(v any, headers []string, rows [][]string) error + type Mode int + const ModeJSON + const ModePlain + const ModeTable + func GetMode(ctx context.Context) Mode + func ModeFromFlags(jsonFlag, plainFlag bool) Mode + func (m Mode) String() string + type Table struct + func NewTable(w io.Writer, headers ...string) *Table + func (t *Table) AddRow(cells ...string) + func (t *Table) Render() error + func (t *Table) RowCount() int + type TableBuilder struct + func NewTableBuilder(w io.Writer) *TableBuilder + func (b *TableBuilder) Build() *Table + func (b *TableBuilder) Headers(headers ...string) *TableBuilder + func (b *TableBuilder) Render() error + func (b *TableBuilder) Row(cells ...string) *TableBuilder