Documentation
¶
Index ¶
- func AddSISuffix(v float64, binary bool) (val float64, suffix string)
- func Colorize(text string) string
- func Owl() string
- type ProgressBar
- type ProgressOption
- func ProgressOptionAppendAdditionalInfo(f func() string) ProgressOption
- func ProgressOptionBarSegments(segments int) ProgressOption
- func ProgressOptionDescription(description string) ProgressOption
- func ProgressOptionTickInterval(interval time.Duration) ProgressOption
- func ProgressOptionWriter(w io.Writer) ProgressOption
- type Prompt
- func (p *Prompt) Ask(question string) (string, error)
- func (p *Prompt) AskSecret(question string) (string, error)
- func (p *Prompt) BlankLine()
- func (p *Prompt) Confirm(text string) bool
- func (p *Prompt) Description(text string)
- func (p *Prompt) Error(text string)
- func (p *Prompt) Info(text string)
- func (p *Prompt) List(items []string) string
- func (p *Prompt) Print(i ...interface{})
- func (p *Prompt) Printf(format string, i ...interface{})
- func (p *Prompt) Title(text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSISuffix ¶ added in v0.25.0
Types ¶
type ProgressBar ¶ added in v0.25.0
type ProgressBar struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶ added in v0.25.0
func NewProgressBar(opts ...ProgressOption) *ProgressBar
func (*ProgressBar) Finish ¶ added in v0.25.0
func (p *ProgressBar) Finish()
func (*ProgressBar) Set ¶ added in v0.25.0
func (p *ProgressBar) Set(cur, max uint64)
func (*ProgressBar) Start ¶ added in v0.25.0
func (p *ProgressBar) Start()
func (*ProgressBar) Stop ¶ added in v0.25.0
func (p *ProgressBar) Stop()
func (*ProgressBar) Update ¶ added in v0.25.0
func (p *ProgressBar) Update(cur uint64)
type ProgressOption ¶ added in v0.25.0
type ProgressOption func(*ProgressBar)
func ProgressOptionAppendAdditionalInfo ¶ added in v0.25.0
func ProgressOptionAppendAdditionalInfo(f func() string) ProgressOption
func ProgressOptionBarSegments ¶ added in v0.25.0
func ProgressOptionBarSegments(segments int) ProgressOption
func ProgressOptionDescription ¶ added in v0.25.0
func ProgressOptionDescription(description string) ProgressOption
func ProgressOptionTickInterval ¶ added in v0.25.0
func ProgressOptionTickInterval(interval time.Duration) ProgressOption
func ProgressOptionWriter ¶ added in v0.25.0
func ProgressOptionWriter(w io.Writer) ProgressOption
Click to show internal directories.
Click to hide internal directories.