1
0
mirror of https://github.com/golang/go synced 2024-11-24 11:00:08 -07:00
go/misc
Russ Cox 4d8db00641 all: use bytes.Cut, strings.Cut
Many uses of Index/IndexByte/IndexRune/Split/SplitN
can be written more clearly using the new Cut functions.
Do that. Also rewrite to other functions if that's clearer.

For #46336.

Change-Id: I68d024716ace41a57a8bf74455c62279bde0f448
Reviewed-on: https://go-review.googlesource.com/c/go/+/351711
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-10-06 15:53:04 +00:00
..
android all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
arm
cgo all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
ios all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
linkcheck all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
reboot all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
swig
trace all: use HTML5 br tags 2021-03-13 03:38:42 +00:00
wasm misc/wasm: enable ECMAScript strict mode 2021-09-03 19:56:09 +00:00
editors
go.mod