buffered ch is not necessary
Vladimir Bauer
8 years ago
| 92 | 92 | // AddBar creates a new progress bar and adds to the container. |
| 93 | 93 | func (p *Progress) AddBar(total int64, options ...BarOption) *Bar { |
| 94 | 94 | p.wg.Add(1) |
| 95 | result := make(chan *Bar, 1) | |
| 95 | result := make(chan *Bar) | |
| 96 | 96 | select { |
| 97 | 97 | case p.operateState <- func(s *pState) { |
| 98 | 98 | options = append(options, barWidth(s.width), barFormat(s.format)) |