encode: fix embedded interfaces (#753)
Resolve marshaling regression when handling an embedded interface in a struct. Fixes #752
This commit is contained in:
+3
-1
@@ -600,7 +600,9 @@ func walkStruct(ctx encoderCtx, t *table, v reflect.Value) {
|
||||
|
||||
if k == "" {
|
||||
if fieldType.Anonymous {
|
||||
walkStruct(ctx, t, f)
|
||||
if fieldType.Type.Kind() == reflect.Struct {
|
||||
walkStruct(ctx, t, f)
|
||||
}
|
||||
continue
|
||||
} else {
|
||||
k = fieldType.Name
|
||||
|
||||
Reference in New Issue
Block a user