diff --git a/progress.go b/progress.go index b81dd69..08aab47 100644 --- a/progress.go +++ b/progress.go @@ -112,15 +112,12 @@ return p.New(total, SpinnerStyle(), options...) } -// New creates a bar with provided BarFillerBuilder. +// New creates a bar which renders itself by `BarFiller`, which is obtained +// via provided `BarFillerBuilder`. If `total <= 0` triggering complete event +// by increment methods is disabled. Panics if *Progress instance is done, +// i.e. called after (*Progress).Wait(). func (p *Progress) New(total int64, builder BarFillerBuilder, options ...BarOption) *Bar { - return p.Add(total, builder.Build(), options...) -} - -// Add creates a bar which renders itself by provided filler. -// If `total <= 0` triggering complete event by increment methods is disabled. -// Panics if *Progress instance is done, i.e. called after (*Progress).Wait(). -func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar { + filler := builder.Build() if filler == nil { filler = NopStyle().Build() }