You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is that if you have message Person v1 and message Person v2, the code gen would include an interface which is implemented by both (with fields getting default values where missing), so consuming code doesn't need to care which one it received.
An Envelope would include one number for Person v1 and another for Person v2.
Code that cares about types can type switch. Code that knows it'll always see Person v2 can skip the interface level and ask to view the right concrete type directly.
The text was updated successfully, but these errors were encountered:
Go-specific details:
The idea is that if you have
message Person v1
andmessage Person v2
, the code gen would include an interface which is implemented by both (with fields getting default values where missing), so consuming code doesn't need to care which one it received.An Envelope would include one number for
Person v1
and another forPerson v2
.Code that cares about types can type switch. Code that knows it'll always see
Person v2
can skip the interface level and ask to view the right concrete type directly.The text was updated successfully, but these errors were encountered: