reflect: add StructField.IsExported method

This field was introduced in Go 1.17 and is used by the encoding/json
package (starting with Go 1.17).
This commit is contained in:
Ayke van Laethem
2021-08-14 15:52:45 +02:00
committed by Ron Evans
parent ad73986070
commit d45497691f
3 changed files with 19 additions and 0 deletions
+1
View File
@@ -398,6 +398,7 @@ func showValue(rv reflect.Value, indent string) {
println(indent+" field:", i, field.Name)
println(indent+" tag:", field.Tag)
println(indent+" embedded:", field.Anonymous)
println(indent+" exported:", field.IsExported())
showValue(rv.Field(i), indent+" ")
}
default: