]> Cypherpunks repositories - gostls13.git/commit
encoding/json/v2: cleanup error constructors
authorJoe Tsai <joetsai@digital-static.net>
Thu, 24 Jul 2025 22:07:39 +0000 (15:07 -0700)
committerJoseph Tsai <joetsai@digital-static.net>
Wed, 13 Aug 2025 22:47:52 +0000 (15:47 -0700)
commit4b1800e47632d52006e3080580e4e60792389759
treef2b43968d3d1297c999966c5633cd5833a270504
parentaf8870708bbaf15956a27cbab15582b4c666855e
encoding/json/v2: cleanup error constructors

There is no need to explicitly pass in the options
since this contained within the Encoder or Decoder struct
ever since https://github.com/go-json-experiment/json/pull/163.

Thus, remove it as an argument and fetch it from the coder.

This only modifies code that is compiled in under goexperiment.jsonv2.

Change-Id: I6c928b864bf7869889d7ee7d5c1d396fbe71296b
Reviewed-on: https://go-review.googlesource.com/c/go/+/695278
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/encoding/json/v2/arshal_default.go
src/encoding/json/v2/arshal_inlined.go
src/encoding/json/v2/arshal_time.go
src/encoding/json/v2/errors.go