From 5fc97580f98ed5c0e694ae21dcfa5ebae69b2370 Mon Sep 17 00:00:00 2001 From: xuxin Date: Thu, 21 Sep 2023 10:40:34 +0900 Subject: [PATCH] fix concurrence pool buffer --- tag.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tag.go b/tag.go index 9d5459f..cfd9fd6 100644 --- a/tag.go +++ b/tag.go @@ -362,7 +362,8 @@ func (b *HTMLTagBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) } buf.WriteString(fmt.Sprintf("\n", b.tag)) } - r = buf.Bytes() + r = make([]byte, buf.Len()) + copy(r, buf.Bytes()) return }