▲ | debugnik 4 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
> And yes you should convert to OrderTypeA or OrderTypeB at the first opportunity in domain code, Go can only downcast through interfaces so there's something missing to your approach to unions, isn't there? | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | oefrha 4 days ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
The missing something is manually creating the structs, not casting. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|