From 011e40da85bddf83fee0ded83cb9115b7a88b3d4 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 26 Oct 2024 00:48:33 +0700 Subject: all: prealloc slice with possible minimum capabilities --- src/runtime/crash_cgo_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/crash_cgo_test.go') diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index baf4523a7a..cfc45e91ac 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -711,7 +711,7 @@ func TestBigStackCallbackCgo(t *testing.T) { } func nextTrace(lines []string) ([]string, []string) { - var trace []string + trace := make([]string, 0, len(lines)) for n, line := range lines { if strings.HasPrefix(line, "---") { return trace, lines[n+1:] -- cgit v1.3