Documentation
¶
Index ¶
- func RenderTable(w io.Writer, headers []string, rows [][]string, colors *Colors) error
- func WriteJSON(w io.Writer, v any) error
- func WriteKV(w io.Writer, pairs [][2]string, colors *Colors) error
- func WriteTSV(w io.Writer, _ []string, rows [][]string) error
- type Colors
- func (c *Colors) Bold(s string) string
- func (c *Colors) Cyan(s string) string
- func (c *Colors) Enabled() bool
- func (c *Colors) Faint(s string) string
- func (c *Colors) Green(s string) string
- func (c *Colors) Red(s string) string
- func (c *Colors) StatusColor(status string) string
- func (c *Colors) Yellow(s string) string
- type Formatter
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTable ¶
RenderTable renders a table with headers and rows using tabwriter
Types ¶
type Colors ¶
type Colors struct {
// contains filtered or unexported fields
}
Colors provides terminal color styling
func (*Colors) StatusColor ¶
StatusColor returns the appropriate color for a status string
type Formatter ¶
Formatter provides a unified interface for outputting data
func NewFormatter ¶
NewFormatter creates a formatter with the given settings
type Mode ¶
type Mode int
Mode represents the output format mode
func ModeFromFlags ¶
ModeFromFlags returns the output mode based on command flags JSON takes precedence over plain
Click to show internal directories.
Click to hide internal directories.