term

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Reset  = "\033[0m"
	Yellow = "\033[33m"
	Blue   = "\033[34m"
	Cyan   = "\033[36m"
	Red    = "\033[31m"
)

Variables

This section is empty.

Functions

func Color

func Color(col, str string) string

func IsTTY

func IsTTY(w io.Writer) bool

func PrintHeader

func PrintHeader(w io.Writer, description string) error

func WrapText

func WrapText(s string, maxWidth, indentSpaces int) string

Types

type Format

type Format int
const (
	// PlainFormat renders human-readable plain text
	Plain Format = iota
	// JSONFormat renders machine-readable JSON
	JSON
)

type Spinner

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

func StartSpinner

func StartSpinner(w io.Writer, message string) *Spinner

StartSpinner starts a spinner writing to w with the given message. Returns a no-op Spinner if w is not a TTY.

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop halts the spinner and clears the line.

Jump to

Keyboard shortcuts

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