output

package
v1.0.56 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package output provides shared output utilities for formatting and printing data to various destinations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(w io.Writer, data any) error

JSON encodes data as indented JSON to the given writer. If a one-time §1.8 migration block is pending, it is spliced in as a top-level "_migration" field and consumed (so it appears exactly once, on the first JSON command after the migration). With no pending block the output is byte-identical to a plain indented Encoder (2-space indent, trailing newline) — existing per-domain printJSON() callers inherit the splice for free via JSONStdout.

func JSONStdout

func JSONStdout(data any) error

JSONStdout encodes data as indented JSON to stdout. This is a convenience function that wraps JSON(os.Stdout, data).

Types

This section is empty.

Jump to

Keyboard shortcuts

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