Skip to content

Commit

Permalink
SetTotal godoc upd
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Feb 21, 2022
1 parent 71608c0 commit c51c704
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,10 @@ func (b *Bar) EnableTriggerComplete() {
}

// SetTotal sets total to an arbitrary value. It's effective only for
// bar which was constructed with `total <= 0` and if
// (*Bar).EnableTriggerComplete hasn't been called yet. Setting total
// to negative value is equivalent to (*Bar).SetTotal((*Bar).Current(),
// bool). If triggerCompleteNow is true then total value is set to
// current and complete event is triggered right away.
// bar which was constructed with `total <= 0`. Setting total to negative
// value is equivalent to (*Bar).SetTotal((*Bar).Current(), bool).
// If triggerCompleteNow is true, total value is set to current and
// complete event is triggered right away.
func (b *Bar) SetTotal(total int64, triggerCompleteNow bool) {
select {
case b.operateState <- func(s *bState) {
Expand Down

0 comments on commit c51c704

Please sign in to comment.