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/callers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/callers_test.go') diff --git a/src/runtime/callers_test.go b/src/runtime/callers_test.go index 9429442fc0..c4cea7ef87 100644 --- a/src/runtime/callers_test.go +++ b/src/runtime/callers_test.go @@ -40,7 +40,7 @@ func testCallers(t *testing.T, pcs []uintptr, pan bool) { } } - var seen []string + seen := make([]string, 0, len(m)) for k := range m { seen = append(seen, k) } -- cgit v1.3