Documentation
¶
Index ¶
- Constants
- Variables
- func HTML(r *result.Result, writer io.Writer) error
- func IsSupportedFormat(name string) bool
- func JSON(r any, writer io.Writer, options *JSONOption) error
- func Svg(r *result.Result, writer io.Writer, options *SvgOption) error
- func Text(r *result.Result, writer io.Writer, options *CommonOption) error
- type CommonOption
- type JSONOption
- type SvgOption
Constants ¶
View Source
const ( FormatText = "text" FormatJSON = "json" FormatHTML = "html" FormatSVG = "svg" )
Variables ¶
View Source
var ErrTemplateInvalid = errors.New("template invalid")
View Source
var SupportedFormats = []string{FormatText, FormatJSON, FormatHTML, FormatSVG}
SupportedFormats lists every format accepted by the printer package, in the canonical order used by help text and test matrices.
Functions ¶
func IsSupportedFormat ¶ added in v1.12.5
IsSupportedFormat reports whether name is one of SupportedFormats.
Types ¶
type CommonOption ¶ added in v0.3.0
type JSONOption ¶ added in v1.0.4
Click to show internal directories.
Click to hide internal directories.