Codebase list golang-github-vbauerster-mpb / c33a0a1
edit comments Vladimir Bauer 6 years ago
3 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
149149 }
150150 }
151151
152 // SetRefill sets refill, if supported by underlying Filler.
153 // Useful for resume-able tasks.
152 // SetRefill fills bar with refill rune up to amount argument.
153 // Given default bar style is "[=>-]<+", refill rune is '+'.
154 // To set bar style use mpb.BarStyle(string) BarOption.
154155 func (b *Bar) SetRefill(amount int64) {
155156 type refiller interface {
156157 SetRefill(int64)
129129
130130 // BarStyle overrides mpb.DefaultBarStyle, for example BarStyle("╢▌▌░╟").
131131 // If you need to override `reverse tip` and `refill rune` set 6th and
132 // 7th rune respectively, for example BarStyle("[=>-]<+").
132 // 7th rune respectively, for example mpb.BarStyle("[=>-]<+").
133133 func BarStyle(style string) BarOption {
134134 if style == "" {
135135 return nil
165165 }
166166 }
167167
168 // UpdateBarPriority same as *Bar.SetPriority.
168 // UpdateBarPriority same as *Bar.SetPriority(int).
169169 func (p *Progress) UpdateBarPriority(b *Bar, priority int) {
170170 p.setBarPriority(b, priority)
171171 }