1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:04:42 -07:00

cmd/api: use strings.Builder

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

View File

@ -5,7 +5,6 @@
package main
import (
"bytes"
"flag"
"fmt"
"go/build"
@ -152,7 +151,7 @@ func TestCompareAPI(t *testing.T) {
},
}
for _, tt := range tests {
buf := new(bytes.Buffer)
buf := new(strings.Builder)
gotok := compareAPI(buf, tt.features, tt.required, tt.optional, tt.exception, true)
if gotok != tt.ok {
t.Errorf("%s: ok = %v; want %v", tt.name, gotok, tt.ok)