Documentation ¶
Index ¶
- Constants
- func FormatJSON(out io.Writer, data interface{}) error
- func MustInstantiateMarkdownTemplate(templateStr string, customFuncMap template.FuncMap) *template.Template
- func MustInstantiatePlainTemplate(templateStr string, customFuncMap template.FuncMap) *template.Template
- type FormatFunc
- type FormatType
- type Formatters
Constants ¶
View Source
const ( // PlainFormat is for plain terminal output, possibly colored. PlainFormat = "plain" // MarkdownFormat is for markdown output suitable for `*.md` files. MarkdownFormat = "markdown" // JSONFormat is for JSON output with kube-linter's own data structs. JSONFormat = "json" // SARIFFormat is JSON-based standard for reporting lint errors. // See https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sarif SARIFFormat = "sarif" )
Variables ¶
This section is empty.
Functions ¶
func FormatJSON ¶
FormatJSON formats data as JSON, i.e. implements JSONFormat.
Types ¶
type FormatFunc ¶
FormatFunc sets contract formatter of each FormatType should follow.
type Formatters ¶
type Formatters struct {
Formatters map[FormatType]FormatFunc
}
Formatters struct provides way to define supported output formats for a command.
func (Formatters) FormatterByType ¶
func (f Formatters) FormatterByType(t string) (FormatFunc, error)
FormatterByType looks up formatter for a given type among the ones configured in this instance.
func (Formatters) GetEnabledFormatters ¶
func (f Formatters) GetEnabledFormatters() []string
GetEnabledFormatters returns a string slice enumerating all enabled formatters of this instance.
Click to show internal directories.
Click to hide internal directories.