]> Cypherpunks repositories - gostls13.git/commit
reflect: simplify Value.Comparable
authorcuiweixie <cuiweixie@gmail.com>
Mon, 29 Aug 2022 17:30:53 +0000 (01:30 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 26 Sep 2022 16:36:07 +0000 (16:36 +0000)
commitc3728b75024667927f690373cea324dd26777414
tree94819edc4baa5053988838ce3506a5d2ead3b813
parentdeaec39323aced382a12ed0360fad03ad1dbb906
reflect: simplify Value.Comparable

using Type.Comparable to simplify the Value.Comparable,
and return true directly when exit the for loop of kind == array and elements type is interface or array or struct.

Change-Id: Ib0b06a70642ba24c9215c69e7d619960fbeeed90
Reviewed-on: https://go-review.googlesource.com/c/go/+/426457
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: xie cui <523516579@qq.com>
src/reflect/value.go