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

readable

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package readable renders API values as plain, labeled text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Text

func Text(text string) string

Text escapes terminal controls and directional marks while preserving ordinary newlines and tabs. It adds no newline and does not redact sensitive content.

func Write

func Write(w io.Writer, value gjson.Result) error

Write renders value in its original field order, without a pager or a table. Strings and array values are complete, including multiline text. Terminal controls are escaped even when w is a redirected output stream.

func WriteText

func WriteText(out io.Writer, value string) error

WriteText escapes terminal controls and writes one complete text result. It appends a newline only when the text does not already end with one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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