Skip to content

Commit

Permalink
encoding/xml: use bytes.Buffer.WriteString
Browse files Browse the repository at this point in the history
Change-Id: Icb0b917c48252ed8831e6c07109c1bc2d2438a42
Reviewed-on: https://go-review.googlesource.com/c/go/+/421234
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: hopehook <hopehook@qq.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Dan Kortschak <dan@kortschak.io>
  • Loading branch information
mvdan authored and jproberts committed Aug 10, 2022
1 parent dbe7192 commit ba0d28e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encoding/xml/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ Input:

if haveText {
d.buf.Truncate(before)
d.buf.Write([]byte(text))
d.buf.WriteString(text)
b0, b1 = 0, 0
continue Input
}
Expand Down

0 comments on commit ba0d28e

Please sign in to comment.