1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:54:43 -07:00

net/http/httptrace: use strings.Builder

Change-Id: I407d11b43349cd78b709deb7b0e774bd93922caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/428269
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
cuiweixie 2022-09-04 18:36:22 +08:00 committed by Damien Neil
parent ce8dcd9879
commit 8f14a4602d

View File

@ -5,13 +5,13 @@
package httptrace
import (
"bytes"
"context"
"strings"
"testing"
)
func TestWithClientTrace(t *testing.T) {
var buf bytes.Buffer
var buf strings.Builder
connectStart := func(b byte) func(network, addr string) {
return func(network, addr string) {
buf.WriteByte(b)
@ -37,7 +37,7 @@ func TestWithClientTrace(t *testing.T) {
}
func TestCompose(t *testing.T) {
var buf bytes.Buffer
var buf strings.Builder
var testNum int
connectStart := func(b byte) func(network, addr string) {