1
0
mirror of https://github.com/golang/go synced 2024-09-28 19:24:29 -06:00

cmd/internal/obj: replace bytes.Index call with bytes.Contains

Change-Id: I6b30ac3e9d15c29197426fb16dc4031056f6bb10
GitHub-Last-Rev: e2dda286f2
GitHub-Pull-Request: golang/go#66331
Reviewed-on: https://go-review.googlesource.com/c/go/+/571915
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
guoguangwu 2024-03-15 07:33:32 +00:00 committed by Gopher Robot
parent 159144f28b
commit bedda24574

View File

@ -93,7 +93,7 @@ LOOP:
data := bytes.Split(objout, []byte("\n"))
for idx := len(data) - 1; idx >= 0; idx-- {
// check that RET wasn't overwritten.
if bytes.Index(data[idx], []byte("RET")) != -1 {
if bytes.Contains(data[idx], []byte("RET")) {
if testing.Short() {
break LOOP
}