Codebase list golang-github-vbauerster-mpb / 1222666
Underscore unused params Vladimir Bauer 9 years ago
1 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
232232 for i := 0; i < numBars; i++ {
233233 name := fmt.Sprintf("b#%02d:", i)
234234 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 {
236236 if s.ID == 2 && s.Current >= 42 {
237237 panic(wantPanic)
238238 }
251251 wg.Wait()
252252 p.Stop()
253253
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]
256257 if gotPanic != wantPanic {
257258 t.Errorf("Want panic: %s, got panic: %s\n", wantPanic, gotPanic)
258259 }