diff options
Diffstat (limited to 'libgo/go/net/main_test.go')
-rw-r--r-- | libgo/go/net/main_test.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libgo/go/net/main_test.go b/libgo/go/net/main_test.go index dc17d3f..1ee8c2e 100644 --- a/libgo/go/net/main_test.go +++ b/libgo/go/net/main_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js package net @@ -174,11 +173,8 @@ func runningGoroutines() []string { b := make([]byte, 2<<20) b = b[:runtime.Stack(b, true)] for _, s := range strings.Split(string(b), "\n\n") { - ss := strings.SplitN(s, "\n", 2) - if len(ss) != 2 { - continue - } - stack := strings.TrimSpace(ss[1]) + _, stack, _ := strings.Cut(s, "\n") + stack = strings.TrimSpace(stack) if !strings.Contains(stack, "created by net") { continue } |