minor: godoc
Vladimir Bauer
3 years ago
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // EnableTriggerComplete enables triggering complete event. It's |
| 173 | // effective only for bar which was constructed with `total <= 0` and | |
| 173 | // effective only for bars which were constructed with `total <= 0` and | |
| 174 | 174 | // after total has been set with (*Bar).SetTotal(int64, false). If bar |
| 175 | 175 | // has been incremented to the total, complete event is triggered right |
| 176 | 176 | // away. |
| 194 | 194 | |
| 195 | 195 | // SetTotal sets total to an arbitrary value. It's effective only for |
| 196 | 196 | // bar which was constructed with `total <= 0`. Setting total to negative |
| 197 | // value is equivalent to (*Bar).SetTotal((*Bar).Current(), bool). | |
| 197 | // value is equivalent to (*Bar).SetTotal((*Bar).Current(), bool) but faster. | |
| 198 | 198 | // If triggerCompleteNow is true, total value is set to current and |
| 199 | 199 | // complete event is triggered right away. |
| 200 | 200 | func (b *Bar) SetTotal(total int64, triggerCompleteNow bool) { |