]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/race: use strings.Builder
authorcuiweixie <cuiweixie@gmail.com>
Sun, 4 Sep 2022 11:07:30 +0000 (19:07 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 8 Sep 2022 13:27:43 +0000 (13:27 +0000)
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>
src/runtime/race/sched_test.go

index 9fe83ea11d35e5acb03aa199f9e62e9e57179a82..a66860cda0f46d0e63c35661359f012f28586dfc 100644 (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])
        }