output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(msg string)

Error prints an error message to stderr

func Info

func Info(msg string)

Info prints an info message to stderr

func JSON

func JSON(v interface{}) error

JSON writes a value as indented JSON to stdout

func Plain

func Plain(rows [][]string)

Plain writes tab-separated values to stdout

func Success

func Success(msg string)

Success prints a success message to stderr (so stdout stays clean for --json)

func Table

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

Table writes a formatted table to stdout

Types

type Format

type Format int

Format represents the output format

const (
	FormatHuman Format = iota
	FormatJSON
	FormatPlain
)

func Resolve

func Resolve(jsonFlag, plainFlag bool) Format

Resolve determines the output format from flags

Jump to

Keyboard shortcuts

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