mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: use strings.Builder
Change-Id: Ie100a2a6f272b84fa2da6ac7b64452985242d788 Reviewed-on: https://go-review.googlesource.com/c/go/+/428275 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
82d1019c60
commit
c75d19732d
2 changed files with 4 additions and 3 deletions
|
|
@ -2085,7 +2085,7 @@ func runSelect(cases []SelectCase, info []caseInfo) (chosen int, recv Value, rec
|
|||
|
||||
// fmtSelect formats the information about a single select test.
|
||||
func fmtSelect(info []caseInfo) string {
|
||||
var buf bytes.Buffer
|
||||
var buf strings.Builder
|
||||
fmt.Fprintf(&buf, "\nselect {\n")
|
||||
for i, cas := range info {
|
||||
fmt.Fprintf(&buf, "%d: %s", i, cas.desc)
|
||||
|
|
@ -3705,7 +3705,7 @@ func TestSetLenCap(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestVariadic(t *testing.T) {
|
||||
var b bytes.Buffer
|
||||
var b strings.Builder
|
||||
V := ValueOf
|
||||
|
||||
b.Reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue