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:
parent
b00c8368b9
commit
a40f6e8fae
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user