From: cuiweixie Date: Sun, 4 Sep 2022 09:21:08 +0000 (+0800) Subject: misc: use strings.Builder X-Git-Tag: go1.20rc1~1207 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=c761409e01307592fc3f4e4a73dc82fe1a39c807;p=gostls13.git misc: use strings.Builder Change-Id: Icb53d32f2de13287b1b4f4f67dab90fe5ee7a3df Reviewed-on: https://go-review.googlesource.com/c/go/+/428254 Reviewed-by: Robert Griesemer Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor --- 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.