Codebase list golang-github-vbauerster-mpb / 39f3b83
edit comments Vladimir Bauer 6 years ago
2 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1717 rRefill
1818 )
1919
20 // DefaultBarStyle is applied when bar constructed with *Progress.AddBar method.
20 // DefaultBarStyle is a string containing 7 runes.
21 // Each rune is a building block of a progress bar.
2122 //
2223 // '1st rune' stands for left boundary rune
2324 //
4344 flush func(w io.Writer, bb [][]byte)
4445 }
4546
46 // NewBarFiller constucts mpb.Filler, to be used with *Progress.Add method.
47 // NewBarFiller constucts mpb.BarFiller, to be used with *Progress.Add(...) *Bar method.
4748 func NewBarFiller(style string, reverse bool) BarFiller {
4849 if style == "" {
4950 style = DefaultBarStyle
1717 SpinnerOnRight
1818 )
1919
20 // DefaultSpinnerStyle is applied when bar constructed with *Progress.AddSpinner method.
20 // DefaultSpinnerStyle is a slice of strings, which makes a spinner.
2121 var DefaultSpinnerStyle = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
2222
2323 type spinnerFiller struct {
2626 alignment SpinnerAlignment
2727 }
2828
29 // NewSpinnerFiller constucts mpb.Filler, to be used with *Progress.Add method.
29 // NewSpinnerFiller constucts mpb.BarFiller, to be used with *Progress.Add(...) *Bar method.
3030 func NewSpinnerFiller(style []string, alignment SpinnerAlignment) BarFiller {
3131 if len(style) == 0 {
3232 style = DefaultSpinnerStyle