aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml/xml_test.go
diff options
context:
space:
mode:
authorcuiweixie <cuiweixie@gmail.com>2022-09-04 17:44:30 +0800
committerGopher Robot <gobot@golang.org>2022-09-06 15:46:20 +0000
commitab87db8b46fcd987f0d42ecdd03c149288bc9383 (patch)
treecb187352afec867aac977649fcb220c4448fc988 /src/encoding/xml/xml_test.go
parenta89c3d76ba3c8f75663ebb83ebdbe8432582e9d2 (diff)
downloadgo-ab87db8b46fcd987f0d42ecdd03c149288bc9383.tar.xz
encoding: use strings.Builder
Change-Id: Ib07699df8ea41fd8d1bca8ad050859fac24623de Reviewed-on: https://go-review.googlesource.com/c/go/+/428258 Reviewed-by: Robert Griesemer <gri@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> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/encoding/xml/xml_test.go')
-rw-r--r--src/encoding/xml/xml_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/xml/xml_test.go b/src/encoding/xml/xml_test.go
index 8f0d97b6a6..7266b8fc99 100644
--- a/src/encoding/xml/xml_test.go
+++ b/src/encoding/xml/xml_test.go
@@ -894,7 +894,7 @@ func TestEscapeTextInvalidChar(t *testing.T) {
input := []byte("A \x00 terminated string.")
expected := "A \uFFFD terminated string."
- buff := new(bytes.Buffer)
+ buff := new(strings.Builder)
if err := EscapeText(buff, input); err != nil {
t.Fatalf("have %v, want nil", err)
}