Remove GetAppenders and GetPrependers
Vladimir Bauer
9 years ago
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | // GetAppenders returns slice of appender DecoratorFunc | |
| 216 | func (b *Bar) GetAppenders() []DecoratorFunc { | |
| 217 | s := b.getState() | |
| 218 | return s.appendFuncs | |
| 219 | } | |
| 220 | ||
| 221 | 215 | 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) | |
| 229 | 217 | } |
| 230 | 218 | |
| 231 | 219 | 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 | |
| 237 | 225 | func (b *Bar) GetStatistics() *Statistics { |
| 238 | 226 | s := b.getState() |
| 239 | 227 | return newStatistics(&s) |