-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
I see that last year support for embedded structs was added, but it doesn't enable the builder to create a type with embedded structs.
Something like this:
type stitle struct{ Title string }
type stext struct{ Text string }
dstruct := dynamicstruct.NewStruct().
AddField("", stitle{}, ``).
AddField("", stext{}, ``).
Build().
New()
type compare struct {
stitle
stext
}
if dstruct != compare{} {
fmt.Println("expected equal")
}Besides the general idea of creating a new struct, do you think this is a reasonable interface? In particular if name == "", then set anonymous: true.
Metadata
Metadata
Assignees
Labels
No labels