Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownOutputFormat = errors.New(`must be one of "table", "json", or "yaml"`)
Functions ¶
func Output ¶
func Output[K comparable, V any](out map[K]V, output OutputFormat, opts OutputOptions) (string, error)
Types ¶
type OutputFormat ¶
type OutputFormat string
const ( OutputFormatTable OutputFormat = "table" OutputFormatJSON OutputFormat = "json" OutputFormatYAML OutputFormat = "yaml" )
func (*OutputFormat) Set ¶
func (e *OutputFormat) Set(v string) error
Set must have pointer receiver so it doesn't change the value of a copy
func (*OutputFormat) String ¶
func (e *OutputFormat) String() string
func (*OutputFormat) Type ¶
func (e *OutputFormat) Type() string
type OutputOptions ¶
Click to show internal directories.
Click to hide internal directories.