output

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package output provides renderers that write CoverageReport data in different formats: terminal text with ANSI colours, JSON, and Markdown.

Index

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

func RenderManifestJSON(manifest *types.Manifest, w io.Writer) error

RenderManifestJSON serialises a manifest as indented JSON and writes it to w.

func RenderManifestMarkdown added in v0.0.8

func RenderManifestMarkdown(manifest *types.Manifest, w io.Writer)

RenderManifestMarkdown writes a Markdown table of manifest items to w.

func RenderManifestText added in v0.0.8

func RenderManifestText(manifest *types.Manifest, w io.Writer)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL