Documentation ¶
Overview ¶
Package formatters provides the base interface type for different output formatters to implement
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomFormatter ¶
type CustomFormatter struct {
// contains filtered or unexported fields
}
CustomFormatter is a formatter that is configurable via a template string
func NewCustomFormatter ¶
func NewCustomFormatter(templateString string) (ret *CustomFormatter, err error)
NewCustomFormatter returns a CustomFormatter struct
func (*CustomFormatter) Format ¶
func (f *CustomFormatter) Format(violations rules.RuleViolationList)
Format is the function to call to get the formatted output
type DefaultFormatter ¶
type DefaultFormatter struct {
// contains filtered or unexported fields
}
DefaultFormatter is the formatter used by default for CLI output
func NewDefaultFormatter ¶
func NewDefaultFormatter() *DefaultFormatter
NewDefaultFormatter returns a DefaultFormatter struct
func (*DefaultFormatter) Format ¶
func (f *DefaultFormatter) Format(violations rules.RuleViolationList)
Format is the function to call to get the formatted output
type Formatter ¶
type Formatter interface {
Format(violations rules.RuleViolationList)
}
Formatter is the base interface type to implement for formatters
Click to show internal directories.
Click to hide internal directories.