]> Cypherpunks repositories - gostls13.git/commit
encoding/json/jsontext: preserve buffer capacity in Encoder.Reset
authorJoe Tsai <joetsai@digital-static.net>
Wed, 25 Jun 2025 01:56:26 +0000 (18:56 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 25 Jul 2025 17:47:45 +0000 (10:47 -0700)
commitebdbfccd989b07a8aef75af5fbe7448f035ee239
tree6072864893f39149ffcc48c85bc5780175da581b
parent91c4f0ccd542a505f72ad0db952f55688851e49e
encoding/json/jsontext: preserve buffer capacity in Encoder.Reset

This does the equivalent of CL 681177 for the Encoder.
It preserves the internal buffer between resets.

Change-Id: I5e9353b6d7755e067d4f9a4d1ea3d8f056253027
Reviewed-on: https://go-review.googlesource.com/c/go/+/690375
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/encoding/json/jsontext/decode.go
src/encoding/json/jsontext/decode_test.go
src/encoding/json/jsontext/encode.go
src/encoding/json/jsontext/encode_test.go