Documentation
¶
Index ¶
- Constants
- func Close()
- func Fatal(args ...any)
- func Header(str string)
- func Open()
- func Println(args ...any) (n int, err error)
- func Quote(args ...any)
- func RenderFunc(f RendererFunc)
- func SwapHud()
- func SwapInterval(t time.Duration)
- func Width() int
- func WriteText(text []Cell, s string, fg, bg Color) (n int, err error)
- type Alignment
- type Cell
- type Color
- type Component
- type Hud
- type ProgressBar
- type RendererFunc
- type Spinner
- type Stylesheet
- type Text
Constants ¶
View Source
const ( // Stylesheet.Sequence indices for styling progress bars PbCaseLeft = iota PbCaseRight PbFluid PbVoid PbTail PbHead )
View Source
const ( Left = iota Right Center )
View Source
const ( // Use no color but the default None = iota Black Red Green Yellow Blue Magenta Cyan LightGray Gray BrightRed BrightGreen BrightYellow BrightBlue BrightMagenta BrightCyan White )
Variables ¶
This section is empty.
Functions ¶
func SwapInterval ¶
Automatically swap at the designated interval
Types ¶
type ProgressBar ¶
type ProgressBar struct {
Stylesheet Stylesheet
// Must be in range from 0-1
Progress float64
}
type RendererFunc ¶
type RendererFunc func(h *Hud)
type Spinner ¶
type Spinner struct {
Stylesheet Stylesheet
// How long it takes to move to a new sequence
Frequency time.Duration
}
type Stylesheet ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.