display

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModeAuto detect console capabilities
	ModeAuto = "auto"
	// ModeTTY use terminal capability for advanced rendering
	ModeTTY = "tty"
	// ModePlain dump raw events to output
	ModePlain = "plain"
	// ModeQuiet don't display events
	ModeQuiet = "quiet"
	// ModeJSON outputs a machine-readable JSON stream
	ModeJSON = "json"
)
View Source
const (
	DRYRUN_PREFIX = " DRY-RUN MODE - "
)

Variables

View Source
var (
	DoneColor    colorFunc = aec.BlueF.Apply
	TimerColor   colorFunc = aec.BlueF.Apply
	CountColor   colorFunc = aec.YellowF.Apply
	WarningColor colorFunc = aec.YellowF.With(aec.Bold).Apply
	SuccessColor colorFunc = aec.GreenF.Apply
	ErrorColor   colorFunc = aec.RedF.With(aec.Bold).Apply
	PrefixColor  colorFunc = aec.CyanF.Apply
)
View Source
var Mode = ModeAuto

Mode define how progress should be rendered, either as ModePlain or ModeTTY

Functions

func Full

func Full(out io.Writer, info io.Writer) api.EventProcessor

Full creates an EventProcessor that render advanced UI within a terminal. On Start, TUI lists task with a progress timer

func JSON

func JSON(out io.Writer) api.EventProcessor

func NoColor

func NoColor()

func Plain

func Plain(out io.Writer) api.EventProcessor

func Quiet

func Quiet() api.EventProcessor

Types

type Spinner

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

func NewSpinner

func NewSpinner() *Spinner

func (*Spinner) Restart

func (s *Spinner) Restart()

func (*Spinner) Stop

func (s *Spinner) Stop()

func (*Spinner) String

func (s *Spinner) String() string

Jump to

Keyboard shortcuts

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