Codebase list golang-github-vbauerster-mpb / e993c9f
Rename Statistics.Id to Statistics.ID Vladimir Bauer 9 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
3737 // Statistics represents statistics of the progress bar.
3838 // Cantains: Total, Current, TimeElapsed, TimePerItemEstimate
3939 type Statistics struct {
40 Id int
40 ID int
4141 Completed bool
4242 Total int64
4343 Current int64
501501
502502 func newStatistics(s *state) *Statistics {
503503 return &Statistics{
504 Id: s.id,
504 ID: s.id,
505505 Completed: s.completed,
506506 Total: s.total,
507507 Current: s.current,
233233 name := fmt.Sprintf("b#%02d:", i)
234234 bar := p.AddBarWithID(i, 100).
235235 PrependFunc(func(s *mpb.Statistics, yw chan<- int, mw <-chan int) string {
236 if s.Id == 2 && s.Current >= 42 {
236 if s.ID == 2 && s.Current >= 42 {
237237 panic(wantPanic)
238238 }
239239 return name