render

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package render writes typed broker results to an io.Writer in the format the caller requested: human-readable (default), a single JSON document for agents and evals, or a terse concise mode (SPEC.md §15). Keeping formatting here means the broker and adapters never format output themselves.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(format string) (string, bool)

Normalize maps a raw format flag to a known format, defaulting unknown or empty values to human and reporting whether the input was recognized.

func Output

func Output(w io.Writer, format string, v any) error

Output writes v to w. In JSON mode it emits a single indented document so the whole response is machine-consumable; otherwise it uses the value's Render method, falling back to JSON if the value is not Renderable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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