]> Cypherpunks repositories - gostls13.git/commit
encoding/json: make use of Buffer.AvailableBuffer
authorJoe Tsai <joetsai@digital-static.net>
Sat, 11 Mar 2023 20:03:28 +0000 (12:03 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 15 Mar 2023 15:41:55 +0000 (15:41 +0000)
commit2e51f6f25cfc37f1e1d6fd3a90f0570979939a21
treebae827c86ba9b00aedce29e5331c6e973400eff7
parente64e000f5561a37cbfae1e9e48d516d93934c91b
encoding/json: make use of Buffer.AvailableBuffer

Use the explicit API for acquiring an empty available buffer,
rather than the hack that's implemented in terms of Bytes and Len.

Change-Id: If286ed42693acd61ffe28dc849ed4b76c3ae4434
Reviewed-on: https://go-review.googlesource.com/c/go/+/476337
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/encoding/json/encode.go
src/encoding/json/indent.go