From 1429a97520ea526dc0ced275789694aa9566c81f Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Mon, 5 Sep 2022 14:56:27 +0800 Subject: [PATCH] cmd/compile/internal/ir: use strings.Builder Change-Id: I24fb36a0591782c07f26c3289265aa41a643666d Reviewed-on: https://go-review.googlesource.com/c/go/+/428357 Auto-Submit: Ian Lance Taylor Reviewed-by: Robert Griesemer Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Run-TryBot: Robert Griesemer --- src/cmd/compile/internal/ir/mknode.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/compile/internal/ir/mknode.go b/src/cmd/compile/internal/ir/mknode.go index be529a7e5c..d815195721 100644 --- a/src/cmd/compile/internal/ir/mknode.go +++ b/src/cmd/compile/internal/ir/mknode.go @@ -254,9 +254,9 @@ func processType(t *ast.TypeSpec) { } } // Process fields. - var copyBody bytes.Buffer - var doChildrenBody bytes.Buffer - var editChildrenBody bytes.Buffer + var copyBody strings.Builder + var doChildrenBody strings.Builder + var editChildrenBody strings.Builder for _, f := range fields { if f.Tag != nil { tag := f.Tag.Value[1 : len(f.Tag.Value)-1]