Open soumiksamanta opened 3 years ago
There currently isn't a way to do this within ygen, but we'd be happy to discuss a design for doing so.
It seems like there are some complexities with doing this, since you would want to be able to specify a custom set of annotations per field of the generated struct, which means we need to support some way to get those changes. Options for this might be:
I expect that designing the last of these is the most useful, but the most complex, and I think would be something that we would want to do within the context of supporting the IR that we've discussed in other issues, since this would then be something extensible that we could use for different use cases.
Is there a way where I can generate the struct with custom tags on few fields?
For example, HoldTime having an extra struct tag
This way the same generated GoStruct can be used by other tools.