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

output

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(ms *int64) string

FormatDuration formats milliseconds as human-readable duration.

func NewTable added in v0.2.53

func NewTable(w io.Writer, columns []string) *tablewriter.Table

NewTable creates the CLI's standard borderless table.

func OutputJSON

func OutputJSON(data any, filePath string) error

OutputJSON writes data as indented JSON to stdout or a file. If filePath is non-empty, writes to file and prints status to stderr.

func OutputJSONL

func OutputJSONL(items []map[string]any, filePath string) error

OutputJSONL writes items as JSONL (one JSON object per line).

func OutputTable

func OutputTable(columns []string, rows [][]string, title string)

OutputTable prints a table to stdout using tablewriter.

func OutputTree

func OutputTree(runs []RunTreeData, rootID string)

OutputTree prints a trace hierarchy tree.

func PrintError

func PrintError(msg string)

PrintError prints an error to stderr.

func PrintOutput

func PrintOutput(data any, format string, filePath string) error

PrintOutput dispatches to JSON or pretty output.

func PrintRunsTable

func PrintRunsTable(w io.Writer, runs []map[string]any, includeMetadata bool, title string)

PrintRunsTable prints a table of runs in pretty format.

Types

type RunTreeData

type RunTreeData struct {
	ID          string
	ParentRunID string
	Name        string
	RunType     string
	DurationMs  *int64
	HasError    bool
}

RunTreeData holds the data needed for tree rendering.

Jump to

Keyboard shortcuts

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