Codebase list golang-github-vbauerster-mpb / 12aa790
prefer strings.Contains Vladimir Bauer 9 years ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
9696
9797 p.Stop()
9898
99 bytes := removeLastRune(buf.Bytes())
100 got := string(bytes[len(bytes)-customWidth:])
99 got := buf.String()
101100 want := fmt.Sprintf("[%s]", strings.Repeat("=", customWidth-2))
102 if got != want {
101 if !strings.Contains(buf.String(), want) {
103102 t.Errorf("Expected format: %s, got %s\n", want, got)
104103 }
105104 }