Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
JSON = Register("json", NewJSONPrinter())
)
View Source
var Registry = map[string]Printer{}
View Source
var (
Table = Register("table", NewTablePrinter())
)
Functions ¶
func ListFormats ¶
func ListFormats() []string
Types ¶
type JSONPrinter ¶
type JSONPrinter struct{}
func NewJSONPrinter ¶
func NewJSONPrinter() *JSONPrinter
func (*JSONPrinter) SetColumns ¶ added in v0.1.0
func (p *JSONPrinter) SetColumns(cols []string)
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
func NewTablePrinter ¶
func NewTablePrinter() *TablePrinter
func (*TablePrinter) Print ¶
func (printer *TablePrinter) Print(w io.Writer, p Printable) error
TODO: refactor
func (*TablePrinter) SetColumns ¶ added in v0.1.0
func (printer *TablePrinter) SetColumns(cols []string)
Click to show internal directories.
Click to hide internal directories.