clean up
Vladimir Bauer
8 years ago
| 82 | 82 | WithShutdownNotifier(shutdown), |
| 83 | 83 | ) |
| 84 | 84 | |
| 85 | numBars := 3 | |
| 86 | bars := make([]*Bar, 0, numBars) | |
| 87 | for i := 0; i < numBars; i++ { | |
| 85 | for i := 0; i < 2; i++ { | |
| 88 | 86 | bar := p.AddBar(int64(1000), BarID(i)) |
| 89 | bars = append(bars, bar) | |
| 90 | 87 | go func() { |
| 91 | 88 | for !bar.Completed() { |
| 92 | 89 | time.Sleep(randomDuration(100 * time.Millisecond)) |