edit comments
Vladimir Bauer
6 years ago
| 149 | 149 |
}
|
| 150 | 150 |
}
|
| 151 | 151 |
|
| 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.
|
| 154 | 155 |
func (b *Bar) SetRefill(amount int64) {
|
| 155 | 156 |
type refiller interface {
|
| 156 | 157 |
SetRefill(int64)
|
| 129 | 129 |
|
| 130 | 130 |
// BarStyle overrides mpb.DefaultBarStyle, for example BarStyle("╢▌▌░╟").
|
| 131 | 131 |
// 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("[=>-]<+").
|
| 133 | 133 |
func BarStyle(style string) BarOption {
|
| 134 | 134 |
if style == "" {
|
| 135 | 135 |
return nil
|
| 165 | 165 |
}
|
| 166 | 166 |
}
|
| 167 | 167 |
|
| 168 | |
// UpdateBarPriority same as *Bar.SetPriority.
|
|
168 |
// UpdateBarPriority same as *Bar.SetPriority(int).
|
| 169 | 169 |
func (p *Progress) UpdateBarPriority(b *Bar, priority int) {
|
| 170 | 170 |
p.setBarPriority(b, priority)
|
| 171 | 171 |
}
|