Documentation ¶ Index ¶ type Format type Formatter func NewFormatter(format string, writer io.Writer, useColor bool) *Formatter func (f *Formatter) Print(data any) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Format ¶ type Format string Format represents the output format const ( // FormatText represents text format FormatText Format = "text" // FormatJSON represents JSON format FormatJSON Format = "json" // FormatYAML represents YAML format FormatYAML Format = "yaml" ) type Formatter ¶ type Formatter struct { Format Format Writer io.Writer Color bool } Formatter formats the output func NewFormatter ¶ func NewFormatter(format string, writer io.Writer, useColor bool) *Formatter NewFormatter creates a new formatter func (*Formatter) Print ¶ func (f *Formatter) Print(data any) error Print prints the data in the specified format Source Files ¶ View all Source files formatter.go Click to show internal directories. Click to hide internal directories.