Documentation
¶
Overview ¶
Package ui renders Bindle's terminal output: colors and symbols when stdout is a TTY, plain ASCII when piped or when NO_COLOR is set. No heavy dependencies — ANSI escapes plus a small TTY probe.
Index ¶
- type Printer
- func (p *Printer) Blue(s string) string
- func (p *Printer) Bold(s string) string
- func (p *Printer) Bullet(format string, a ...any)
- func (p *Printer) Color() bool
- func (p *Printer) Cyan(s string) string
- func (p *Printer) Dim(s string) string
- func (p *Printer) Fail(format string, a ...any)
- func (p *Printer) Gray(s string) string
- func (p *Printer) Green(s string) string
- func (p *Printer) Heading(format string, a ...any)
- func (p *Printer) Info(format string, a ...any)
- func (p *Printer) KeyVal(key, val string)
- func (p *Printer) OK(format string, a ...any)
- func (p *Printer) Printf(format string, a ...any)
- func (p *Printer) Red(s string) string
- func (p *Printer) Spinner(label string) *Spinner
- func (p *Printer) Step(format string, a ...any)
- func (p *Printer) Warn(format string, a ...any)
- func (p *Printer) Writer() io.Writer
- func (p *Printer) Yellow(s string) string
- type Spinner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer renders styled output to a writer, downgrading to plain when needed.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner is a single-line progress indicator. On a TTY it animates in place; in plain mode it degrades to one "→ label" line per Start/Update (no animation, pipe-safe).
Click to show internal directories.
Click to hide internal directories.