You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by antonlindstrom <gi...@git.apache.org> on 2015/02/02 17:28:38 UTC

[GitHub] thrift pull request: THRIFT-2189 add union support for go generato...

GitHub user antonlindstrom opened a pull request:

    https://github.com/apache/thrift/pull/369

    THRIFT-2189 add union support for go generator

    This makes it possible to check if a field  is set and skips adding new ones.
    Fields in unions are pointers by setting them as `t_field::T_OPTIONAL`.
    
    To be sure that exactly one and only one field is set in a union, we count the
    number of fields set and return an error if not exactly one field is set.
    
    Thanks!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/antonlindstrom/thrift feature/go-generator-union

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/369.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #369
    
----
commit a7f0fc25ad0f2f245dadf753f53d640d3afcb8b2
Author: Anton Lindström <li...@gmail.com>
Date:   2015-01-30T09:28:16Z

    THRIFT-2189 add union support for go generator
    
    This makes it possible to check if a field  is set and skips adding new ones.
    Fields in unions are pointers by setting them as `t_field::T_OPTIONAL`.
    
    To be sure that exactly one and only one field is set in a union, we count the
    number of fields set and return an error if not exactly one field is set.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2189 add union support for go generato...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/369


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---