Codebase list golang-github-vbauerster-mpb / f3bc128
Remove GetAppenders and GetPrependers Vladimir Bauer 9 years ago
1 changed file(s) with 6 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
212212 }
213213 }
214214
215 // GetAppenders returns slice of appender DecoratorFunc
216 func (b *Bar) GetAppenders() []DecoratorFunc {
217 s := b.getState()
218 return s.appendFuncs
219 }
220
221215 func (b *Bar) NumOfAppenders() int {
222 return len(b.GetAppenders())
223 }
224
225 // GetPrependers returns slice of prepender DecoratorFunc
226 func (b *Bar) GetPrependers() []DecoratorFunc {
227 s := b.getState()
228 return s.prependFuncs
216 return len(b.getState().appendFuncs)
229217 }
230218
231219 func (b *Bar) NumOfPrependers() int {
232 return len(b.GetPrependers())
233 }
234
235 // GetStatistics returs *Statistics, which contains information like Tottal,
236 // Current, TimeElapsed and TimePerItemEstimate
220 return len(b.getState().prependFuncs)
221 }
222
223 // GetStatistics returs *Statistics, which contains information like
224 // Tottal, Current, TimeElapsed and TimePerItemEstimate
237225 func (b *Bar) GetStatistics() *Statistics {
238226 s := b.getState()
239227 return newStatistics(&s)