Codebase list golang-github-vbauerster-mpb / 8a688ac
godoc upd Vladimir Bauer 6 years ago
2 changed file(s) with 4 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1717 // Filler interface.
1818 // Bar renders by calling Filler's Fill method. You can literally have
1919 // any bar kind, by implementing this interface and passing it to the
20 // Add method.
20 // mpb.Add function.
2121 type Filler interface {
2222 Fill(w io.Writer, width int, stat *decor.Statistics)
2323 }
5252 }
5353 }
5454
55 // BarRemoveOnComplete removes whole bar line on complete event. Any
56 // decorators attached to the bar, having OnComplete action will not
57 // have a chance to run its OnComplete action, because of this option.
55 // BarRemoveOnComplete removes bar filler and decorators if any, on
56 // complete event.
5857 func BarRemoveOnComplete() BarOption {
5958 return func(s *bState) {
6059 s.dropOnComplete = true
7776 }
7877 }
7978
80 // BarClearOnComplete clears bar part of bar line on complete event.
79 // BarClearOnComplete clears bar filler only, on complete event.
8180 func BarClearOnComplete() BarOption {
8281 return func(s *bState) {
8382 s.filler = makeClearOnCompleteFiller(s.filler)