Documentation ¶
Index ¶
- type Config
- func (cfg *Config) ColorJSON(value interface{}) (string, error)
- func (cfg *Config) ColorYAML(text string) (string, error)
- func (cfg *Config) Render(value interface{}) error
- func (cfg *Config) ToCSV(value interface{}) error
- func (cfg *Config) ToJSON(value interface{}) error
- func (cfg *Config) ToTable(value interface{}) error
- func (cfg *Config) ToYAML(value interface{}) error
- type Renderer
Constants ¶
This section is empty.
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.