output

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 7 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(data interface{})

JSON prints data as indented JSON to stdout.

func JoinStrings

func JoinStrings(items []string, sep string) string

JoinStrings joins a slice of strings.

func KeyValue

func KeyValue(pairs [][2]string)

KeyValue renders key-value pairs in a simple format.

func Print

func Print(data interface{}, tableFn func(data interface{}))

Print outputs data as JSON or table based on the --json flag.

func PrintRaw

func PrintRaw(body []byte, tableFn func(data map[string]interface{}))

PrintRaw prints the raw byte body as JSON (for untyped API responses).

func Progressf added in v0.1.4

func Progressf(format string, args ...interface{})

Progressf prints a progress or status message to stderr.

Long-running commands report progress this way so stdout carries only the command's result and stays parseable by scripts and agents.

func StringOrEmpty

func StringOrEmpty(v interface{}) string

StringOrEmpty returns the string value of an interface or empty string.

func Success

func Success(msg string)

Success prints a success message.

func Successf

func Successf(format string, args ...interface{})

Successf prints a formatted success message.

func Table

func Table(headers []string, rows [][]string)

Table renders data as a clean ASCII table.

func Truncate

func Truncate(s string, maxLen int) string

Truncate shortens a string to maxLen with ellipsis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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