Documentation
¶
Index ¶
- func Bold(text string) string
- func CommandList(cmds []CommandEntry) string
- func Cyan(text string) string
- func Dim(text string) string
- func FormatError(brief string, detail string, suggestion string) string
- func Gray(text string) string
- func Green(text string) string
- func Label(text string, width int) string
- func Red(text string) string
- func SetColorEnabled(enabled bool)
- func Step(current, total int, title string) string
- func Success(msg string) string
- func Warning(msg string) string
- func Yellow(text string) string
- type CommandEntry
- type Spinner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandList ¶
func CommandList(cmds []CommandEntry) string
CommandList formats commands in aligned columns.
func FormatError ¶
FormatError formats a red error with optional detail and suggestion.
func SetColorEnabled ¶
func SetColorEnabled(enabled bool)
SetColorEnabled overrides automatic color detection.
Types ¶
type CommandEntry ¶
CommandEntry describes a command for list formatting.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner shows a braille dot animation on stderr during long operations. No-op when stderr is not a TTY.
func (*Spinner) StopWithMessage ¶
Click to show internal directories.
Click to hide internal directories.