output

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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

View Source
const DefaultMaxCell = 120

Variables

This section is empty.

Functions

func Cell

func Cell(value any, limit int) string

func Lookup

func Lookup(row map[string]any, column string) any

func OrderedKeys

func OrderedKeys(rows []map[string]any) []string

func Truncate

func Truncate(text string, limit int) string

Types

type Format

type Format string
const (
	Table Format = "table"
	JSON  Format = "json"
	JSONL Format = "jsonl"
)

func ParseFormat

func ParseFormat(value string) (Format, error)

type Printer

type Printer struct {
	Out         io.Writer
	Err         io.Writer
	Format      Format
	MaxCell     int
	Interactive bool
	Quiet       bool
}

func (*Printer) Any

func (p *Printer) Any(value any) error

func (*Printer) Line

func (p *Printer) Line(format string, arguments ...any)

func (*Printer) List

func (p *Printer) List(envelope any, columns []string, rows []map[string]any) error

func (*Printer) Note

func (p *Printer) Note(format string, arguments ...any)

func (*Printer) Object

func (p *Printer) Object(object map[string]any) error

func (*Printer) Value

func (p *Printer) Value(value any) error

Jump to

Keyboard shortcuts

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