output

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format string

Format represents the output format type

const (
	FormatText Format = "text"
	FormatJSON Format = "json"
)

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

Formatter handles output formatting for the CLI

func NewFormatter

func NewFormatter(format string) *Formatter

NewFormatter creates a new output formatter

func (*Formatter) Print

func (f *Formatter) Print(data interface{})

Print outputs data in the configured format

func (*Formatter) PrintError

func (f *Formatter) PrintError(msg string)

PrintError prints an error message to stderr

func (*Formatter) PrintFailure

func (f *Formatter) PrintFailure(msg string)

PrintFailure prints a failure indicator

func (*Formatter) PrintKeyValue

func (f *Formatter) PrintKeyValue(key string, value interface{})

PrintKeyValue prints a key-value pair in the standard format

func (*Formatter) PrintSuccess

func (f *Formatter) PrintSuccess(msg string)

PrintSuccess prints a success indicator

Jump to

Keyboard shortcuts

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