render

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package render converts Result values into human-readable or machine-parseable output. Each format is a separate function; the top-level Render dispatcher selects based on the format string.

Index

Constants

View Source
const (
	FormatTable = "table"
	FormatJSON  = "json"
	FormatJSONL = "jsonl"
	FormatCSV   = "csv"
	FormatTSV   = "tsv"
	FormatMD    = "md"
)

Format constants matching --format flag values.

Variables

This section is empty.

Functions

func PrintFooter

func PrintFooter(w io.Writer, result *model.Result, verbose bool)

PrintFooter writes warnings and stats to w when verbose mode is on.

func Render

func Render(w io.Writer, result *model.Result, format string) error

Render writes result to w in the specified format.

func RenderCategories

func RenderCategories(w io.Writer, cats []model.Category, format string) error

RenderCategories writes a category slice using the given format.

func RenderReleases

func RenderReleases(w io.Writer, releases []model.Release, format string) error

RenderReleases writes a release slice using the given format.

func RenderSources

func RenderSources(w io.Writer, sources []model.Source, format string) error

RenderSources writes a source slice using the given format.

func RenderTags

func RenderTags(w io.Writer, tags []model.Tag, format string) error

RenderTags writes a tag slice using the given format.

func RenderTo

func RenderTo(path string, result *model.Result, format string) error

RenderTo writes to stdout by default; if path is non-empty, writes to file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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