Documentation
¶
Overview ¶
Package ui formats the Tern CLI's terminal output: colors, symbols, spinners and tables. Color and animation turn off automatically when output is not a terminal, and NO_COLOR and FORCE_COLOR are honored.
Index ¶
- func Duration(d time.Duration) string
- func Size(n int64) string
- type Printer
- func (p *Printer) Bold(s string) string
- func (p *Printer) Brand(s string) string
- func (p *Printer) Cyan(s string) string
- func (p *Printer) Dim(s string) string
- func (p *Printer) Error(err error)
- func (p *Printer) Event(symbol, format string, args ...any)
- func (p *Printer) Failure(format string, args ...any)
- func (p *Printer) Green(s string) string
- func (p *Printer) Printf(format string, args ...any)
- func (p *Printer) Println(args ...any)
- func (p *Printer) Red(s string) string
- func (p *Printer) Spin(label string) *Spinner
- func (p *Printer) Success(format string, args ...any)
- func (p *Printer) Table(rows [][]string, style func(col int, cell string) string)
- func (p *Printer) Warn(format string, args ...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 ¶
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer writes styled output to w.
Click to show internal directories.
Click to hide internal directories.