Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSkipHeader ¶ added in v1.4.0
ValidateSkipHeader returns an error if --skip-header is used with a format that has no header row (e.g. JSON or YAML).
Types ¶
type Format ¶
type Format string
Format represents the output format type
func ParseFormat ¶
ParseFormat parses a format string into a Format type
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter handles output formatting
func NewFormatter ¶
func NewFormatter(format Format, w io.Writer, opts ...FormatterOption) *Formatter
NewFormatter creates a formatter for the specified output format
func (*Formatter) Print ¶
Print outputs data in the configured format (JSON or YAML only) For table format, use the type-specific table printing functions
func (*Formatter) PrintTable ¶
PrintTable prints a table with the given columns and data
type FormatterOption ¶ added in v1.4.0
type FormatterOption func(*Formatter)
FormatterOption configures optional Formatter behavior.
func WithSkipHeader ¶ added in v1.4.0
func WithSkipHeader(skip bool) FormatterOption
WithSkipHeader omits the header row from table output.
Click to show internal directories.
Click to hide internal directories.