Documentation ¶
Overview ¶
Package terminal is for terminal outputting
Index ¶
- Variables
- type ProgressBar
- type Terminal
- func (t *Terminal) Eprint(a string)
- func (t *Terminal) Eprintf(format string, a ...interface{})
- func (t *Terminal) Errprint(err error, a string)
- func (t *Terminal) Errprintf(err error, format string, a ...interface{})
- func (t *Terminal) NewProgressBar(description string, onComplete func()) *ProgressBar
- func (t *Terminal) NewSpinner() *spinner.Spinner
- func (t *Terminal) Print(a string)
- func (t *Terminal) Printf(format string, a ...interface{})
- func (t *Terminal) SetVerbose(verbose bool)
- func (t *Terminal) Vprint(a string)
- func (t *Terminal) Vprintf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ProgressBarMax = 100
Functions ¶
This section is empty.
Types ¶
type ProgressBar ¶
type ProgressBar struct { Bar *progressbar.ProgressBar CurrPercentage int }
func (*ProgressBar) AdvanceTo ¶
func (bar *ProgressBar) AdvanceTo(percentage int)
func (*ProgressBar) Describe ¶
func (bar *ProgressBar) Describe(text string)
type Terminal ¶
type Terminal struct { Green func(format string, a ...interface{}) string Yellow func(format string, a ...interface{}) string Red func(format string, a ...interface{}) string Blue func(format string, a ...interface{}) string Bar ProgressBar Spinner *spinner.Spinner // contains filtered or unexported fields }
func (*Terminal) NewProgressBar ¶
func (t *Terminal) NewProgressBar(description string, onComplete func()) *ProgressBar
func (*Terminal) NewSpinner ¶ added in v0.3.0
func (*Terminal) SetVerbose ¶
Click to show internal directories.
Click to hide internal directories.