]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/api: use strings.Builder
authorcuiweixie <cuiweixie@gmail.com>
Sun, 4 Sep 2022 11:51:27 +0000 (19:51 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 8 Sep 2022 14:33:31 +0000 (14:33 +0000)
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>

src/cmd/api/goapi_test.go

index 862ab183b2f9899ccb50c0df0117ac6a1838b487..e905e65b24aa92006060ddfd4bad655ce10c9855 100644 (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)