]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc: use strings.Builder
authorcuiweixie <cuiweixie@gmail.com>
Sun, 4 Sep 2022 09:21:08 +0000 (17:21 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 6 Sep 2022 15:44:25 +0000 (15:44 +0000)
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>

misc/android/go_android_exec.go

index 168ebe88a2241340c8ecae41d5c3f85401bb7101..308dacaf7c16062fcb8a5de7d3db3aff22892d27 100644 (file)
@@ -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.