mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
952c2fd606
commit
b04f3b06ec
26 changed files with 38 additions and 38 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue