mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
a60a3dc5bc
commit
c761409e01
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue