render

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package render writes human and JSON command output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJSON

func WriteJSON(writer io.Writer, value any, compact bool) error

WriteJSON writes a JSON value.

func WriteLine

func WriteLine(writer io.Writer, format string, args ...any) error

WriteLine writes a single line.

Types

type Format

type Format string

Format selects the output renderer.

const (
	// FormatHuman writes compact human-readable text.
	FormatHuman Format = "human"
	// FormatJSON writes indented JSON.
	FormatJSON Format = "json"
	// FormatCompact writes one-line compact text.
	FormatCompact Format = "compact"
)

Jump to

Keyboard shortcuts

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