Documentation
¶
Overview ¶
Package printer provides functions for rendering resources.Resource collections into various formats for outputting to the terminal or command pipeline.
Index ¶
- func ByName(name string) (func(io.Writer, []resources.Resource) error, error)
- func JSON(w io.Writer, results []resources.Resource) error
- func Name(w io.Writer, results []resources.Resource) error
- func Path(w io.Writer, results []resources.Resource) error
- func References(w io.Writer, results []resources.Resource) error
- func Selector(w io.Writer, items []resources.Resource) error
- func Table(w io.Writer, items []resources.Resource) error
- func YAML(w io.Writer, items []resources.Resource) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByName ¶
ByName returns a printer function from the given name. If no name is given and the program output is being redirected or piped to a consumer process, hen default to the YAML printer. Additionally, if no name is given and the program output is being sent directly to the terminal, then instead default to the Table printer.
func JSON ¶
JSON prints each given resources.Resource as a single-line json document. Intended to be used when piping to a script that could e.g. `read` each resource in a loop.
func References ¶
References prints the names of all resources referenced by each given resources.Resource.
func Selector ¶ added in v0.4.0
Selector prints each given resources.Resource with the resource name and a matching label selector.
Types ¶
This section is empty.