Documentation
¶
Overview ¶
Package output provides renderers that write CoverageReport data in different formats: terminal text with ANSI colours, JSON, and Markdown.
Index ¶
- func RenderJSON(report *types.CoverageReport, w io.Writer) error
- func RenderManifestJSON(manifest *types.Manifest, w io.Writer) error
- func RenderManifestMarkdown(manifest *types.Manifest, w io.Writer)
- func RenderManifestText(manifest *types.Manifest, w io.Writer)
- func RenderMarkdown(report *types.CoverageReport, w io.Writer)
- func RenderOneLine(report *types.CoverageReport, w io.Writer)
- func RenderText(report *types.CoverageReport, w io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderJSON ¶
func RenderJSON(report *types.CoverageReport, w io.Writer) error
RenderJSON serialises report as indented JSON and writes it to w, followed by a trailing newline. Any encoding or write error is returned to the caller.
func RenderManifestJSON ¶ added in v0.0.8
RenderManifestJSON serialises a manifest as indented JSON and writes it to w.
func RenderManifestMarkdown ¶ added in v0.0.8
RenderManifestMarkdown writes a Markdown table of manifest items to w.
func RenderManifestText ¶ added in v0.0.8
RenderManifestText writes a human-readable tabular manifest to w. Only shows TYPE and NAME columns since scan has no usage data.
func RenderMarkdown ¶
func RenderMarkdown(report *types.CoverageReport, w io.Writer)
RenderMarkdown writes a GitHub-flavoured Markdown table to w. The output uses the same columns as RenderText but without ANSI colour codes, making it suitable for embedding in Markdown documents and pull-request comments.
func RenderOneLine ¶
func RenderOneLine(report *types.CoverageReport, w io.Writer)
RenderOneLine writes a single-line coverage summary to w. If the manifest is empty (no config items found), nothing is written.
func RenderText ¶
func RenderText(report *types.CoverageReport, w io.Writer)
RenderText writes a human-readable tabular report to w. Columns are aligned with text/tabwriter. When w is os.Stdout and stdout is a terminal, status values are highlighted with ANSI colours.
Types ¶
This section is empty.