Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputType ¶
type OutputType string
OutputType represents the type of output, JSON, XML, TSV, etc.
var ( // JSONFormat tell the printer to print json JSONFormat OutputType = "json" )
type Printable ¶
type Printable interface {
Print(writer io.Writer, format OutputType) error
}
Printable is an object that can format itself
type Printer ¶
type Printer interface { Print(obj interface{}) error Printf(format string, args ...interface{}) ErrPrintf(format string, args ...interface{}) }
Printer prints objects
type StdPrinter ¶
type StdPrinter struct {
Format OutputType
}
StdPrinter is a printer that prints to os.Stdout
func (StdPrinter) ErrPrintf ¶
func (StdPrinter) ErrPrintf(format string, args ...interface{})
ErrPrintf will print a formatted string to os.Stderr
func (StdPrinter) Print ¶
func (stdPrinter StdPrinter) Print(obj interface{}) error
Print prints an object to os.Stdout
func (StdPrinter) Printf ¶ added in v0.2.1
func (stdPrinter StdPrinter) Printf(format string, args ...interface{})
Printf prints a formatted string
Click to show internal directories.
Click to hide internal directories.