aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorcuiweixie <cuiweixie@gmail.com>2022-09-04 17:21:08 +0800
committerGopher Robot <gobot@golang.org>2022-09-06 15:44:25 +0000
commitc761409e01307592fc3f4e4a73dc82fe1a39c807 (patch)
tree883f4c8bfc10bfe6f71fed705f1bb250b803038d /misc
parenta60a3dc5bc0336bd6b499bc7e1feb459b1e4a4bc (diff)
downloadgo-c761409e01307592fc3f4e4a73dc82fe1a39c807.tar.gz
go-c761409e01307592fc3f4e4a73dc82fe1a39c807.zip
misc: use strings.Builder
Change-Id: Icb53d32f2de13287b1b4f4f67dab90fe5ee7a3df Reviewed-on: https://go-review.googlesource.com/c/go/+/428254 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/android/go_android_exec.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/misc/android/go_android_exec.go b/misc/android/go_android_exec.go
index 168ebe88a2..308dacaf7c 100644
--- a/misc/android/go_android_exec.go
+++ b/misc/android/go_android_exec.go
@@ -10,7 +10,6 @@
package main
import (
- "bytes"
"errors"
"fmt"
"go/build"
@@ -28,7 +27,7 @@ import (
func run(args ...string) (string, error) {
cmd := adbCmd(args...)
- buf := new(bytes.Buffer)
+ buf := new(strings.Builder)
cmd.Stdout = io.MultiWriter(os.Stdout, buf)
// If the adb subprocess somehow hangs, go test will kill this wrapper
// and wait for our os.Stderr (and os.Stdout) to close as a result.