better doc for BarRemoveOnComplete
Vladimir Bauer
7 years ago
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| 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. | |
| 57 | 56 | func BarRemoveOnComplete() BarOption { |
| 58 | 57 | return func(s *bState) { |
| 59 | 58 | s.dropOnComplete = true |
| 76 | 75 | } |
| 77 | 76 | } |
| 78 | 77 | |
| 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. | |
| 82 | 79 | func BarClearOnComplete() BarOption { |
| 83 | 80 | return func(s *bState) { |
| 84 | 81 | s.noBufBOnComplete = true |