output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntriesCSV

func EntriesCSV(w io.Writer, es []entry.Entry, keys []string) error

func EntriesJSON

func EntriesJSON(w io.Writer, es []entry.Entry, keys []string) error

EntriesJSON emits one object per entry. The keys in each object appear in the same order as `keys`, mirroring the table/csv column order so the JSON output stays predictable for downstream tooling.

func EntriesTable

func EntriesTable(w io.Writer, es []entry.Entry, keys []string) error
func Header(key string) string

Header returns the column header for the given key.

func ParseKeys

func ParseKeys(s string) ([]string, error)

ParseKeys validates a comma-separated list of sort keys, deduplicates them, and appends any unspecified keys in the default order so callers always get a full ordering covering every column.

func SortEntries

func SortEntries(es []entry.Entry, keys []string)

SortEntries orders entries by the supplied keys, using natural-version comparison on each field. Callers typically sort within a single root so that the glob-argument order is preserved across roots in the final flattened output.

func WriteTable

func WriteTable(w io.Writer, headers []string, rows [][]string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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