Help us shape the future of Go! Take the 2026 Go Developer Survey

render

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Findings

func Findings(w io.Writer, fs []validate.Finding, format Format) error

Findings writes findings in the chosen format.

func Index

func Index(w io.Writer, data IndexData, tmpl string) error

Index renders the index. An empty tmpl uses the embedded default.

Types

type Format

type Format int

Format selects an output encoding.

const (
	FormatAuto Format = iota
	FormatTable
	FormatJSON
	FormatJSONL
	FormatPaths
)

func Detect

func Detect(w io.Writer, flag, cfgDefault string) Format

Detect resolves the output format from an explicit flag, the config default, and whether w is a TTY.

type Group

type Group struct {
	Type string
	Docs []model.Doc
}

Group is one type bucket of documents.

type IndexData

type IndexData struct {
	Groups   []Group
	Unmarked []model.Doc
}

IndexData is the template input.

func BuildIndex

func BuildIndex(docs []model.Doc, s *schema.Schema) IndexData

BuildIndex groups marked docs by type and collects the unmarked ones.

Jump to

Keyboard shortcuts

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