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

Jens Geyer commented on THRIFT-4410:
------------------------------------

You did not really say what the expected outcome could be, but at least I can 
say that [there is a reason for 
it|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=compiler/cpp/src/thrift/generate/t_go_generator.cc;h=6cce32bcc4b0132db7690cbb61bdae24b31e1f88;hb=HEAD#l495].
 

> Extra ending underscore with field ending with `result` for Golang
> ------------------------------------------------------------------
>
>                 Key: THRIFT-4410
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4410
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>    Affects Versions: 0.10.0
>         Environment: macos high sierra
>            Reporter: Bob Cao
>
> Given a struct where fields ending with {{result}}
> {code}
> struct Test {
>     1: optional string id_result
>     2: optional string name_result
>     3: optional string full_description_result
>     4: optional string image_url_result
> }
> {code}
> The generated go codes are 
> {code:go}
> type Test struct {
>   IDResult_ *string `thrift:"id_result,1" db:"id_result" 
> json:"id_result,omitempty"`
>   NameResult_ *string `thrift:"name_result,2" db:"name_result" 
> json:"name_result,omitempty"`
>   FullDescriptionResult_ *string `thrift:"full_description_result,3" 
> db:"full_description_result" json:"full_description_result,omitempty"`
>   ImageURLResult_ *string `thrift:"image_url_result,4" db:"image_url_result" 
> json:"image_url_result,omitempty"`
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to