format

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(w io.Writer, value any) error

func Name

func Name(w io.Writer, names []string) error

func Table

func Table(w io.Writer, columns []Column, rows []map[string]string) error

func YAML

func YAML(w io.Writer, value any) error

func YAMLMulti

func YAMLMulti(w io.Writer, values []any) error

Types

type Column

type Column struct {
	Header string
	Key    string
}

type Output

type Output string
const (
	OutputTable Output = "table"
	OutputYAML  Output = "yaml"
	OutputJSON  Output = "json"
	OutputName  Output = "name"
)

func ParseOutput

func ParseOutput(value string) (Output, error)

Jump to

Keyboard shortcuts

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