1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-07-12 22:41:07 +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
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)