aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack_test.go
diff options
context:
space:
mode:
authorcuiweixie <cuiweixie@gmail.com>2022-09-04 18:53:24 +0800
committerDaniel Martí <mvdan@mvdan.cc>2022-09-07 07:02:51 +0000
commitf4bf9bceac20868fb692bacf02ee5b4ccd99b778 (patch)
treebbfb95394e7b5555d7971f8fd0ded3d9d1046c7e /src/runtime/stack_test.go
parent6375f508a861ba2591b4c2a2e9f1172cd3ae8257 (diff)
downloadgo-f4bf9bceac20868fb692bacf02ee5b4ccd99b778.tar.xz
runtime: use strings.Builder
Change-Id: I9274d36ca983fdf59088b71a97b139ea262370dd Reviewed-on: https://go-review.googlesource.com/c/go/+/428276 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/stack_test.go')
-rw-r--r--src/runtime/stack_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/stack_test.go b/src/runtime/stack_test.go
index fe73a6362a..92d58803fc 100644
--- a/src/runtime/stack_test.go
+++ b/src/runtime/stack_test.go
@@ -5,7 +5,6 @@
package runtime_test
import (
- "bytes"
"fmt"
"reflect"
"regexp"
@@ -778,7 +777,7 @@ func TestTracebackSystemstack(t *testing.T) {
// and that we see TestTracebackSystemstack.
countIn, countOut := 0, 0
frames := CallersFrames(pcs)
- var tb bytes.Buffer
+ var tb strings.Builder
for {
frame, more := frames.Next()
fmt.Fprintf(&tb, "\n%s+0x%x %s:%d", frame.Function, frame.PC-frame.Entry, frame.File, frame.Line)