| commit | 59b73b37c1e45995477aae817e4a653c89a858db | [log] [tgz] |
|---|---|---|
| author | David Symonds <dsymonds@golang.org> | Mon Aug 24 13:22:02 2015 +1000 |
| committer | David Symonds <dsymonds@golang.org> | Mon Aug 24 14:25:04 2015 +1000 |
| tree | e281d6441bde173ad345cdcc6f30370654a1d53d | |
| parent | 1e35a3a79e6fc8eedefdbeb905eddf7455fa0f4b [diff] |
Implement oneof support.
This includes the code generation changes,
and the infrastructure to wire it up to the encode/decode machinery.
The overall API changes are these:
- oneofs in a message are replaced by a single interface field
- each field in a oneof gets a distinguished type that satisfies
the corresponding interface
- a type switch may be used to distinguish between oneof fields
Fixes #29.