Codebase list golang-github-vbauerster-mpb / 342d4f2
rename method Add to AddFiller Vladimir Bauer 3 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
113113
114114 // New creates a bar with provided BarFillerBuilder.
115115 func (p *Progress) New(total int64, builder BarFillerBuilder, options ...BarOption) *Bar {
116 return p.Add(total, builder.Build(), options...)
117 }
118
119 // Add creates a bar which renders itself by provided filler.
116 return p.AddFiller(total, builder.Build(), options...)
117 }
118
119 // AddFiller creates a bar which renders itself by provided filler.
120120 // If `total <= 0` triggering complete event by increment methods is disabled.
121121 // Panics if *Progress instance is done, i.e. called after (*Progress).Wait().
122 func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar {
122 func (p *Progress) AddFiller(total int64, filler BarFiller, options ...BarOption) *Bar {
123123 if filler == nil {
124124 filler = NopStyle().Build()
125125 }