From 6a2ff105f169ac3b607621d6b8cd5bd0a7c800e6 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sun, 4 Sep 2022 19:20:31 +0800 Subject: [PATCH] unicode/utf8: use strings.Builder Change-Id: I88b55f61eccb5764cac2a9397fd99a62f8735a9a Reviewed-on: https://go-review.googlesource.com/c/go/+/428281 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Reviewed-by: Benny Siegert --- src/unicode/utf8/utf8_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unicode/utf8/utf8_test.go b/src/unicode/utf8/utf8_test.go index e7c31222cc..19a04dc92e 100644 --- a/src/unicode/utf8/utf8_test.go +++ b/src/unicode/utf8/utf8_test.go @@ -626,7 +626,7 @@ var longStringJapanese string // ~100KB, non-ASCII func init() { const japanese = "日本語日本語日本語日" - var b bytes.Buffer + var b strings.Builder for i := 0; b.Len() < 100_000; i++ { if i%100 == 0 { b.WriteString(japanese)