1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:04:46 -07:00

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 <iant@google.com>
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>
Run-TryBot: Robert Griesemer <gri@google.com>
This commit is contained in:
cuiweixie 2022-09-05 14:56:27 +08:00 committed by Gopher Robot
parent db9e549fd2
commit 1429a97520

View File

@ -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]