Struct enmbeeded
Is possible to get embeeded struct field for example struct A { Person Person }
struct Person { fields.... }
I need to get person fields without use direct struct
this is a common use case, hope we can support it
Hey @TateDeng thanks for bringing this to my attention 🙇🏻
I'll try to find time to look into it, indeed. In the meantime, if you have ideas of how to contribute the feature yourself, feel free to open a pr 👍🏻
Hey @TateDeng thanks for bringing this to my attention 🙇🏻
I'll try to find time to look into it, indeed. In the meantime, if you have ideas of how to contribute the feature yourself, feel free to open a pr 👍🏻
@oleiade I was thinking to support . in the name, tagValue params of all exported functions, e.g. MyEmbeddedStruct.EmbeddedField for below case, what do you think?
type MyStruct struct {
MyEmbeddedStruct
FirstField string `matched:"first tag"`
SecondField int `matched:"second tag"`
ThirdField string `unmatched:"third tag"`
}
type MyEmbeddedStruct struct {
EmbeddedField string
}