Documentation ¶
Overview ¶
Package print provides helpers for structured output printing.
Index ¶
- Constants
- type Printer
- func (p *Printer) Dedent()
- func (p *Printer) Error() error
- func (p *Printer) Indent()
- func (p *Printer) Linef(format string, args ...interface{})
- func (p *Printer) NL()
- func (p *Printer) Printf(format string, args ...interface{})
- func (p *Printer) SetError(err error)
- func (p *Printer) SetIndentString(indent string)
- type TabWriter
Constants ¶
View Source
const DefaultIndent = "\t"
DefaultIndent is the default string for one level of indentation.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer provides convenience methods for structured output printing. Specifically it stores any errors encountered so error checking does not have to be done on every print call. Also provides helpers for managing indentation.
func (*Printer) SetIndentString ¶
SetIndentString configures the string used for one level of indentation.
type TabWriter ¶
type TabWriter struct { Printer // contains filtered or unexported fields }
TabWriter provides tabwriter.Writer functionality with the Printer interface.
Click to show internal directories.
Click to hide internal directories.