Codebase list golang-github-vbauerster-mpb / e996c68
better doc for BarRemoveOnComplete Vladimir Bauer 7 years ago
1 changed file(s) with 4 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
5050 }
5151 }
5252
53 // BarRemoveOnComplete is a flag, if set whole bar line will be removed
54 // on complete event. If both BarRemoveOnComplete and BarClearOnComplete
55 // are set, first bar section gets cleared and then whole bar line
56 // gets removed completely.
53 // BarRemoveOnComplete removes whole bar line on complete event. Any
54 // decorators attached to the bar, having OnComplete action will not
55 // have a chance to run its OnComplete action, because of this option.
5756 func BarRemoveOnComplete() BarOption {
5857 return func(s *bState) {
5958 s.dropOnComplete = true
7675 }
7776 }
7877
79 // BarClearOnComplete is a flag, if set will clear bar section on
80 // complete event. If you need to remove a whole bar line, refer to
81 // BarRemoveOnComplete.
78 // BarClearOnComplete clears bar part of bar line on complete event.
8279 func BarClearOnComplete() BarOption {
8380 return func(s *bState) {
8481 s.noBufBOnComplete = true