summaryrefslogtreecommitdiff
path: root/libgo/go/exp/html/token.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/exp/html/token.go')
-rw-r--r--libgo/go/exp/html/token.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/libgo/go/exp/html/token.go b/libgo/go/exp/html/token.go
index 5a385a1b5c5..b5e9c2d6ea3 100644
--- a/libgo/go/exp/html/token.go
+++ b/libgo/go/exp/html/token.go
@@ -77,8 +77,7 @@ func (t Token) tagString() string {
if len(t.Attr) == 0 {
return t.Data
}
- buf := bytes.NewBuffer(nil)
- buf.WriteString(t.Data)
+ buf := bytes.NewBufferString(t.Data)
for _, a := range t.Attr {
buf.WriteByte(' ')
buf.WriteString(a.Key)