]> Cypherpunks repositories - gostls13.git/commit
net: use strings.SplitSeq and bytes.SplitSeq
authorapocelipes <seve3r@outlook.com>
Wed, 5 Feb 2025 00:37:18 +0000 (00:37 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 5 Feb 2025 01:20:47 +0000 (17:20 -0800)
commita1ea78c470d3136b7aed42a4d8b94497563f98ea
treeeeff0948e18d8ac6087b9120f0be65ab64fd13af
parent0e35fb2f99ce4c249c0a42ad93a597835ae742b5
net: use strings.SplitSeq and bytes.SplitSeq

Replace `for _, s := range {strings, bytes}.Split(v, sep)` with
`for s := range {strings, bytes}.SplitSeq(v, sep)`, to simplify
the code and reduce some memory allocations.

Change-Id: Idead4de1e3928fc75cc5ba8caeff85542f1243d5
GitHub-Last-Rev: 5fb196a073e7583b23b1ebb446d6c067580ed63a
GitHub-Pull-Request: golang/go#71554
Reviewed-on: https://go-review.googlesource.com/c/go/+/646216
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/http/fs.go
src/net/http/httptest/recorder.go
src/net/http/httputil/reverseproxy.go
src/net/http/httputil/reverseproxy_test.go
src/net/http/main_test.go
src/net/http/server.go
src/net/main_test.go
src/net/net_windows_test.go