diff --git a/bar.go b/bar.go index 81d4bd8..e2367c2 100644 --- a/bar.go +++ b/bar.go @@ -144,15 +144,19 @@ } } +// InProgress returns true, while progress is running +// Can be used as condition in for loop func (b *Bar) InProgress() bool { return !b.isDone() } +// PrependFunc prepends DecoratorFunc func (b *Bar) PrependFunc(f DecoratorFunc) *Bar { b.decoratorCh <- &decorator{decoratorPrepend, f} return b } +// AppendFunc appends DecoratorFunc func (b *Bar) AppendFunc(f DecoratorFunc) *Bar { b.decoratorCh <- &decorator{decoratorAppend, f} return b