2 ms·
Hmmmm I thought that sharing a common type did work in the way you would expect it to? I haven't tried embedding with it though I don't think. TBH I rarely do
by CamouflagedKiwi 2y ago
Hmmmm I thought that sharing a common type did work in the way you would expect it to? I haven't tried embedding with it though I don't think.
TBH I rarely do it much anyway, mostly the flag struct ends up being one anonymous struct which is operated on in the main package only. I do like writing custom types for parsing though - I've seen engineers do a bunch of post-hoc parsing logic which generally just ends up being messy.