mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: revert "all: prefer strings.IndexByte over strings.Index"
This reverts https://golang.org/cl/65930. Fixes #22148 Change-Id: Ie0712621ed89c43bef94417fc32de9af77607760 Reviewed-on: https://go-review.googlesource.com/68430 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
7e31d9b9f7
commit
90d71fe99e
55 changed files with 81 additions and 81 deletions
|
|
@ -327,7 +327,7 @@ func (d *deadcodepass) flood() {
|
|||
}
|
||||
for i, m := range methodsigs {
|
||||
name := string(m)
|
||||
name = name[:strings.IndexByte(name, '(')]
|
||||
name = name[:strings.Index(name, "(")]
|
||||
if !strings.HasSuffix(methods[i].ifn().Name, name) {
|
||||
panic(fmt.Sprintf("%q relocation for %q does not match method %q", s.Name, methods[i].ifn().Name, name))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue