all: replace strings.Index with strings.Contains where possible

Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a
Reviewed-on: https://go-review.googlesource.com/18120
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
This commit is contained in:
Nathan VanBenschoten 2015-12-22 02:40:47 -05:00 committed by Russ Cox
parent 952c2fd606
commit b04f3b06ec
26 changed files with 38 additions and 38 deletions

View file

@ -59,7 +59,7 @@ func TestStack(t *testing.T) {
}
func check(t *testing.T, line, has string) {
if strings.Index(line, has) < 0 {
if !strings.Contains(line, has) {
t.Errorf("expected %q in %q", has, line)
}
}