Documentation
¶
Overview ¶
Package printer provides a printer abstraction for human readable output.
Index ¶
- type ConsoleOutput
- type KeyValueError
- type ListTree
- type Printer
- func (c *Printer) FatalError(err error)
- func (c *Printer) KeyValueValidationError(title string, errors []KeyValueError)
- func (c *Printer) LineBreak()
- func (c *Printer) List(title string, items []string)
- func (c *Printer) ListTree(title string, list []ListTree)
- func (c *Printer) StatusList(title string, items []StatusListItem)
- func (c *Printer) Title(title string)
- func (c *Printer) WithBase(style styles.RenderFunc) *Printer
- func (c *Printer) WithLight(style styles.RenderFunc) *Printer
- type StatusListItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleOutput ¶
type ConsoleOutput interface {
ConsoleOutput() string
}
type KeyValueError ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
func (*Printer) FatalError ¶
FatalError printer an error message for an unknown or unexpected error. This is used when an error in the system was unexpected, and the error output should be displayed to the user.
If the error implements the ConsoleOutput interface, the ConsoleOutput method will be called to get the error output.
func (*Printer) KeyValueValidationError ¶
func (c *Printer) KeyValueValidationError(title string, errors []KeyValueError)
func (*Printer) List ¶
List prints a list of items with a title.
Example: Some Title - Item 1 - Item 2 - Item 3
func (*Printer) StatusList ¶
func (c *Printer) StatusList(title string, items []StatusListItem)
StatusList prints a list of status items with a title.
Example:
Some Title ✔ Status 1 ✘ Status 2 ✔ Status 3
type StatusListItem ¶
Click to show internal directories.
Click to hide internal directories.