aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_test.go
diff options
context:
space:
mode:
authorapocelipes <seve3r@outlook.com>2025-02-05 12:19:12 +0000
committerGopher Robot <gobot@golang.org>2025-02-05 15:53:08 -0800
commit4cc7705e56be24d5719b59cb369ce4d40643983c (patch)
tree501110cc505af92500f247460c9db01d6c8514b3 /src/testing/testing_test.go
parent51bf2cf7cfa999777697a9548d59d22c3716fbde (diff)
downloadgo-4cc7705e56be24d5719b59cb369ce4d40643983c.tar.xz
testing: use strings.SplitSeq and bytes.SplitSeq
To simplify the code. This is a follow-up for the CL 646216. Change-Id: Ib09d1074a783482fb293527e9f1abeb3c02137c3 GitHub-Last-Rev: 2e7a6ad40cc22ea855e4d703ff39db9cc2c8a58e GitHub-Pull-Request: golang/go#71568 Reviewed-on: https://go-review.googlesource.com/c/go/+/646755 Reviewed-by: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Salah (Globlost) <globlost@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/testing/testing_test.go')
-rw-r--r--src/testing/testing_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go
index 797728c7a8..addf6cad91 100644
--- a/src/testing/testing_test.go
+++ b/src/testing/testing_test.go
@@ -894,7 +894,7 @@ func TestRunningTestsInCleanup(t *testing.T) {
func parseRunningTests(out []byte) (runningTests []string, ok bool) {
inRunningTests := false
- for _, line := range strings.Split(string(out), "\n") {
+ for line := range strings.SplitSeq(string(out), "\n") {
if inRunningTests {
// Package testing adds one tab, the panic printer adds another.
if trimmed, ok := strings.CutPrefix(line, "\t\t"); ok {