diff --git a/bar.go b/bar.go index 797460b..a3a99f3 100644 --- a/bar.go +++ b/bar.go @@ -199,9 +199,9 @@ // SetTotal sets total to an arbitrary value. It's effective only for // bar which was constructed with `total <= 0`. Setting total to negative // value is equivalent to (*Bar).SetTotal((*Bar).Current(), bool) but faster. -// If triggerCompleteNow is true, total value is set to current and +// If triggerCompletion is true, total value is set to current and // complete event is triggered right away. -func (b *Bar) SetTotal(total int64, triggerCompleteNow bool) { +func (b *Bar) SetTotal(total int64, triggerCompletion bool) { select { case b.operateState <- func(s *bState) { if s.triggerComplete { @@ -212,7 +212,7 @@ } else { s.total = total } - if triggerCompleteNow { + if triggerCompletion { s.current = s.total s.completed = true b.triggerCompletion(s)