Documentation
¶
Overview ¶
Package renderer provides output rendering and syntax highlighting helpers.
Index ¶
Constants ¶
View Source
const ( // TypeYAML identifies YAML content for syntax highlighting. TypeYAML = "yaml" // TypeJSON identifies JSON content for syntax highlighting. TypeJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
YAML bool `json:"yaml,omitempty" yaml:"yaml,omitempty"`
JSON bool `json:"json,omitempty" yaml:"json,omitempty"`
CSV bool `json:"csv,omitempty" yaml:"csv,omitempty"`
Table bool `json:"table,omitempty" yaml:"table,omitempty"`
NoColor bool `json:"no_color,omitempty" yaml:"no_color,omitempty"`
// contains filtered or unexported fields
}
Config implements methods to render output in JSON/YAML format.
func GetRenderer ¶
GetRenderer returns the new instance of Config.
func (*Config) Render ¶
Render renders the output based on the output format selection (toYAML, toJSON). If none is selected it prints as the source.
Click to show internal directories.
Click to hide internal directories.