]> Cypherpunks repositories - gostls13.git/commit
encoding/json: use slices to simplify the code
authorapocelipes <seve3r@outlook.com>
Tue, 2 Apr 2024 13:41:00 +0000 (13:41 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 11 Apr 2024 16:40:14 +0000 (16:40 +0000)
commit08af216c75a583a198c4ccfe68628c74554ee82f
tree3c02d4bd8f1103fec6e353a61028015eae8a3fec
parent45703b50a6ae557ebe9bd7b1bea8e49d66fc97ee
encoding/json: use slices to simplify the code

Use "slices.Equal" instead of "reflect.DeepEqual".

Replace unnecessary helper type "byIndex" with "slices.SortFunc".

No effect on benchmarks.

Change-Id: I1fb2768ea6d9db7f487408fa109343be3f1741d5
GitHub-Last-Rev: 8429bc145272ae620fcd001b1de393bf3c0b6108
GitHub-Pull-Request: golang/go#66646
Reviewed-on: https://go-review.googlesource.com/c/go/+/575715
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/encoding/json/decode_test.go
src/encoding/json/encode.go