Underscore unused params
Vladimir Bauer
9 years ago
| 232 | 232 | for i := 0; i < numBars; i++ { |
| 233 | 233 | name := fmt.Sprintf("b#%02d:", i) |
| 234 | 234 | bar := p.AddBarWithID(i, 100). |
| 235 | PrependFunc(func(s *mpb.Statistics, yw chan<- int, mw <-chan int) string { | |
| 235 | PrependFunc(func(s *mpb.Statistics, _ chan<- int, _ <-chan int) string { | |
| 236 | 236 | if s.ID == 2 && s.Current >= 42 { |
| 237 | 237 | panic(wantPanic) |
| 238 | 238 | } |
| 251 | 251 | wg.Wait() |
| 252 | 252 | p.Stop() |
| 253 | 253 | |
| 254 | out := strings.Split(buf.String(), "\n") | |
| 255 | gotPanic := out[len(out)-2] | |
| 254 | bytes := removeLastRune(buf.Bytes()) | |
| 255 | out := strings.Split(string(bytes), "\n") | |
| 256 | gotPanic := out[len(out)-1] | |
| 256 | 257 | if gotPanic != wantPanic { |
| 257 | 258 | t.Errorf("Want panic: %s, got panic: %s\n", wantPanic, gotPanic) |
| 258 | 259 | } |