mirror of
https://github.com/golang/go
synced 2024-09-30 20:18:33 -06: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:
parent
2b6ff90851
commit
596b0d0410
@ -5,7 +5,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/build"
|
"go/build"
|
||||||
@ -152,7 +151,7 @@ func TestCompareAPI(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
buf := new(bytes.Buffer)
|
buf := new(strings.Builder)
|
||||||
gotok := compareAPI(buf, tt.features, tt.required, tt.optional, tt.exception, true)
|
gotok := compareAPI(buf, tt.features, tt.required, tt.optional, tt.exception, true)
|
||||||
if gotok != tt.ok {
|
if gotok != tt.ok {
|
||||||
t.Errorf("%s: ok = %v; want %v", tt.name, gotok, tt.ok)
|
t.Errorf("%s: ok = %v; want %v", tt.name, gotok, tt.ok)
|
||||||
|
Loading…
Reference in New Issue
Block a user