reflect: implement t.Comparable()

This is necessary to support the context package, which is a dependency
of a lot of packages.
This commit is contained in:
Ayke van Laethem
2019-08-10 22:06:25 +02:00
committed by Ron Evans
parent c19c738f52
commit e356bad4d1
3 changed files with 59 additions and 18 deletions
+3
View File
@@ -268,6 +268,9 @@ func showValue(rv reflect.Value, indent string) {
if rv.CanSet() {
print(" settable=", rv.CanSet())
}
if !rt.Comparable() {
print(" comparable=false")
}
println()
switch rt.Kind() {
case reflect.Bool: