Documentation
¶
Index ¶
- Constants
- func Color(color, text string) string
- func DisableColor()
- func EnableColor()
- func Error(format string, args ...any)
- func Info(format string, args ...any)
- func Percent(value, total float64) string
- func Size(bytes int64) string
- func Success(format string, args ...any)
- func Warn(format string, args ...any)
- type ProgressBar
- type Table
- type Tree
Constants ¶
View Source
const ( Reset = "\033[0m" Bold = "\033[1m" Dim = "\033[2m" Underline = "\033[4m" Black = "\033[30m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" BgBlack = "\033[40m" BgRed = "\033[41m" BgGreen = "\033[42m" BgYellow = "\033[43m" BgBlue = "\033[44m" BgMagenta = "\033[45m" BgCyan = "\033[46m" BgWhite = "\033[47m" )
ANSI color codes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar represents a progress bar.
func NewProgressBar ¶
func NewProgressBar(total int64, width int) *ProgressBar
NewProgressBar creates a new progress bar.
func (*ProgressBar) Increment ¶
func (p *ProgressBar) Increment(n int64)
Increment increments the progress by n.
func (*ProgressBar) SetLabel ¶
func (p *ProgressBar) SetLabel(label string)
SetLabel sets the label for the progress bar.
func (*ProgressBar) Update ¶
func (p *ProgressBar) Update(current int64)
Update updates the progress bar.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents a formatted table.
Click to show internal directories.
Click to hide internal directories.