[fix] fixing f.IsExported undefined issue (#2382)

IsExported needs go1.17, replace with PkgPath
This commit is contained in:
Johnson C
2021-12-07 17:30:48 +08:00
committed by GitHub
parent b00c8368b9
commit a40f6e8fae
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func extractValue(v reflect.Type, d int) *registry.Value {
case reflect.Struct:
for i := 0; i < v.NumField(); i++ {
f := v.Field(i)
if !f.IsExported() {
if f.PkgPath != "" {
continue
}
val := extractValue(f.Type, d+1)
+1 -1
View File
@@ -74,7 +74,7 @@ func extractValue(v reflect.Type, d int) *registry.Value {
case reflect.Struct:
for i := 0; i < v.NumField(); i++ {
f := v.Field(i)
if !f.IsExported() {
if f.PkgPath != "" {
continue
}
val := extractValue(f.Type, d+1)
+1 -1
View File
@@ -29,7 +29,7 @@ func extractValue(v reflect.Type, d int) *registry.Value {
case reflect.Struct:
for i := 0; i < v.NumField(); i++ {
f := v.Field(i)
if !f.IsExported() {
if f.PkgPath != "" {
continue
}
val := extractValue(f.Type, d+1)