runtime/race: use strings.Builder

Change-Id: I644f696d00b5bce448e0a00835b3162f5203f346
Reviewed-on: https://go-review.googlesource.com/c/go/+/428278
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
cuiweixie 2022-09-04 19:07:30 +08:00 committed by Gopher Robot
parent 2960431278
commit 51fdfeb1ce

View file

@ -7,10 +7,10 @@
package race_test
import (
"bytes"
"fmt"
"reflect"
"runtime"
"strings"
"testing"
)
@ -40,7 +40,7 @@ func TestRandomScheduling(t *testing.T) {
}
}
var buf bytes.Buffer
var buf strings.Builder
for i := 0; i < N; i++ {
fmt.Fprintf(&buf, "%v\n", out[i])
}