From 4cc7705e56be24d5719b59cb369ce4d40643983c Mon Sep 17 00:00:00 2001 From: apocelipes Date: Wed, 5 Feb 2025 12:19:12 +0000 Subject: 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Salah (Globlost) Reviewed-by: Damien Neil Auto-Submit: Damien Neil Reviewed-by: Alan Donovan --- src/testing/testing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing/testing.go') diff --git a/src/testing/testing.go b/src/testing/testing.go index 2bfa4b6db0..aefcb84fc8 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -2501,7 +2501,7 @@ func (m *M) stopAlarm() { } func parseCpuList() { - for _, val := range strings.Split(*cpuListStr, ",") { + for val := range strings.SplitSeq(*cpuListStr, ",") { val = strings.TrimSpace(val) if val == "" { continue -- cgit v1.3-5-g9baa