[ 
https://issues.apache.org/jira/browse/THRIFT-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566085#comment-14566085
 ] 

ASF GitHub Bot commented on THRIFT-3174:
----------------------------------------

GitHub user Magrath opened a pull request:

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

    THRIFT-3174: Modify initialism code in Go compiler to check first word

    https://issues.apache.org/jira/browse/THRIFT-3174

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

    $ git pull https://github.com/Magrath/thrift THRIFT-3174

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

    https://github.com/apache/thrift/pull/509.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 #509
    
----
commit c168b8dfd647f497681af69bc132c157553d1448
Author: Magrath <p...@paulmagrath.com>
Date:   2015-05-30T16:26:21Z

    THRIFT-3174: Modify initialism code in Go compiler to check first word

----


> Initialism code in the Go compiler doesn't check first word
> -----------------------------------------------------------
>
>                 Key: THRIFT-3174
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3174
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Paul Magrath
>            Priority: Minor
>
> The Go compiler, when checking for common initialisms in the process of 
> converting to camelcase, fails to check the first word of the name, only 
> checking the subsequent words. As such, if you have a Thrift struct like:-
> {code}
> struct Foo {
>     1: string user_id,
>     2: string server_url,
>     3: string id, 
> }
> {code}
> You get a Go struct of the form:-
> {code}
> type Foo struct {
>       UserID    string `thrift:"user_id,1" json:"user_id"`
>       ServerURL string `thrift:"server_url,2" json:"server_url"`
>       Id        string `thrift:"id,3" json:"id"`
> }
> {code}
> Instead of:-
> {code}
> type Foo struct {
>       UserID    string `thrift:"user_id,1" json:"user_id"`
>       ServerURL string `thrift:"server_url,2" json:"server_url"`
>       ID        string `thrift:"id,3" json:"id"`
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to