Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer interface {
// Text prints the given text as row.
Text(text string)
// JSON marshales the given object into JSON string and prints that.
JSON(obj interface{}) error
// Error prints the given error.
Error(err error)
}
Printer represents the behavior of the CLI results printer.
func NewStandardOutputPrinter ¶
func NewStandardOutputPrinter() Printer
NewStandardOutputPrinter is the constructor of StandardOutputPrinter. Uses stdout to print data.
type StandardPrinter ¶
type StandardPrinter struct {
// contains filtered or unexported fields
}
StandardPrinter implements Printer interface. Prints stuff to the out.
func (*StandardPrinter) Error ¶
func (p *StandardPrinter) Error(err error)
JSON implements Printer interface.
func (*StandardPrinter) JSON ¶
func (p *StandardPrinter) JSON(obj interface{}) error
JSON implements Printer interface.
func (*StandardPrinter) Text ¶
func (p *StandardPrinter) Text(text string)
Text implements Printer interface.
Click to show internal directories.
Click to hide internal directories.