Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeJSON(v interface{}) error
- func EncodeJSONToWriter(v interface{}, w io.Writer) error
- func EncodeOutput[messageType tabulatedData, f func(messageType) error](flagOutputFormat string, v messageType, tableWriter f) error
- func EncodeProtoJSON(v proto.Message) error
- func NewTableWriter() table.Writer
- func NewTableWriterWithWriter(w io.Writer) table.Writer
Constants ¶
View Source
const FormatJSON = "json"
View Source
const FormatTable = "table"
Variables ¶
View Source
var ErrOutputFormatNotImplemented = errors.New("format not implemented")
Functions ¶
func EncodeJSON ¶
func EncodeJSON(v interface{}) error
func EncodeJSONToWriter ¶
func EncodeOutput ¶
func EncodeOutput[messageType tabulatedData, f func(messageType) error](flagOutputFormat string, v messageType, tableWriter f) error
returns either json or table representation of the result
func EncodeProtoJSON ¶
func NewTableWriter ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.