outputs

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintError

func PrintError(msg string)

PrintError prints an error message in red

func PrintInfo

func PrintInfo(msg string)

PrintInfo prints an info message

func PrintSuccess

func PrintSuccess(msg string)

PrintSuccess prints a success message in green

func PrintWarning

func PrintWarning(msg string)

PrintWarning prints a warning message in yellow

func TruncateString

func TruncateString(s string, maxLen int) string

TruncateString truncates a string to the specified length

Types

type OutputFormat

type OutputFormat string

OutputFormat represents the output format

const (
	OutputTable OutputFormat = "table"
	OutputJSON  OutputFormat = "json"
	OutputYAML  OutputFormat = "yaml"
)

type OutputFormatter

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

OutputFormatter handles formatting output in different formats

func NewOutputFormatter

func NewOutputFormatter(format OutputFormat) *OutputFormatter

NewOutputFormatter creates a new output formatter

func (*OutputFormatter) Print

func (f *OutputFormatter) Print(data interface{}) error

Print prints data in the specified format

Jump to

Keyboard shortcuts

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