remove reuse buf todo (#117033)

* reuse buf

Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com>

* remove the todo

Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com>

---------

Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com>
This commit is contained in:
mouuii 2023-04-12 11:20:30 +08:00 committed by GitHub
parent 8722ab2c84
commit 9a46856307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,6 @@ func NewCodec(e Encoder, d Decoder) Codec {
// Encode is a convenience wrapper for encoding to a []byte from an Encoder
func Encode(e Encoder, obj Object) ([]byte, error) {
// TODO: reuse buffer
buf := &bytes.Buffer{}
if err := e.Encode(obj, buf); err != nil {
return nil, err