cmd/pack: use strings.Builder

Change-Id: I1c9f91e983fb26b3e46c65513a4f14508774e543
Reviewed-on: https://go-review.googlesource.com/c/go/+/428291
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
cuiweixie 2022-09-04 20:11:11 +08:00 committed by Gopher Robot
parent ab0d057e64
commit c263fa07b1

View file

@ -6,7 +6,6 @@ package main
import (
"bufio"
"bytes"
"cmd/internal/archive"
"fmt"
"internal/testenv"
@ -15,6 +14,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
"time"
)
@ -28,7 +28,7 @@ func testCreate(t *testing.T, dir string) {
ar.a.File().Close()
// Now check it.
ar = openArchive(name, os.O_RDONLY, []string{helloFile.name})
var buf bytes.Buffer
var buf strings.Builder
stdout = &buf
verbose = true
defer func() {
@ -72,7 +72,7 @@ func TestTableOfContents(t *testing.T) {
ar.a.File().Close()
// Now print it.
var buf bytes.Buffer
var buf strings.Builder
stdout = &buf
verbose = true
defer func() {