1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00

[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

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)

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)

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)