Skip to content

Commit a81ba17

Browse files
committed
Support changes to reflect package
1 parent 53fab6d commit a81ba17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

encoding/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func typeFields(t reflect.Type) []field {
100100
// Scan f.typ for fields to include.
101101
for i := 0; i < f.typ.NumField(); i++ {
102102
sf := f.typ.Field(i)
103-
if sf.PkgPath != "" { // unexported
103+
if sf.PkgPath != "" && !sf.Anonymous { // unexported
104104
continue
105105
}
106106
tag := getTag(sf)

0 commit comments

Comments
 (0)