Add an "embed" tag.

This commit is contained in:
Alec Thomas
2018-09-19 13:23:18 +10:00
parent 0ba159f97d
commit 54338bd8b1
5 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ func flattenedFields(v reflect.Value) (out []flattenedField) {
if tag.Ignored {
continue
}
if ft.Anonymous {
if ft.Anonymous || tag.Embed {
if fv.Kind() == reflect.Interface {
fv = fv.Elem()
}