render

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render turns a Report into output. The core never renders; the CLI's tty view and a host's JSON API are two consumers of the same Report.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(w io.Writer, r *onair.Report) error

JSON writes the report as indented JSON. The shape is a public API: changes are additive only.

func TTY

func TTY(w io.Writer, r *onair.Report, opts TTYOptions) error

TTY writes the human view of the report. Missing tiers render as honest labels, never as errors - degrade gracefully, always show something useful.

Types

type TTYOptions

type TTYOptions struct {
	Color bool
	// Now anchors the "(2h ago)" humanization; zero means time.Now().
	Now time.Time
}

TTYOptions controls the terminal renderer.

Jump to

Keyboard shortcuts

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