Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E302E200D67 for ; Sun, 10 Dec 2017 06:30:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E1806160C20; Sun, 10 Dec 2017 05:30:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 31E75160C0E for ; Sun, 10 Dec 2017 06:30:08 +0100 (CET) Received: (qmail 86501 invoked by uid 500); 10 Dec 2017 05:30:07 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 86490 invoked by uid 99); 10 Dec 2017 05:30:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Dec 2017 05:30:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BC235C1924 for ; Sun, 10 Dec 2017 05:30:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Uo3CYd6-zFON for ; Sun, 10 Dec 2017 05:30:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E5BC55F5D2 for ; Sun, 10 Dec 2017 05:30:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 686D8E015F for ; Sun, 10 Dec 2017 05:30:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C47D9212F5 for ; Sun, 10 Dec 2017 05:30:00 +0000 (UTC) Date: Sun, 10 Dec 2017 05:30:00 +0000 (UTC) From: "Bob Cao (JIRA)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (THRIFT-4410) Extra ending underscore with field ending with `result` for Golang MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 10 Dec 2017 05:30:09 -0000 [ https://issues.apache.org/jira/browse/THRIFT-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285086#comment-16285086 ] Bob Cao commented on THRIFT-4410: --------------------------------- Hi [~jensg], thanks for the explanation! I tried very hard to understand it but still can't fully comprehend. Would you mind providing a concert example where the conflicts actually rise without the underscore, under the context of thrift version 0.10.0? That will greatly help! Thanks in advance! :) > 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: Question > Components: Go - Compiler > Affects Versions: 0.10.0 > Environment: macos high sierra > Reporter: Bob Cao > Priority: Trivial > > 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} > I am expecting the field has the same name as defined (no undersore at the end). > Thanks [~jensg] for pointing out the codes, if anyone could en-light me about why IDL identifiers end with "Args"/"Result" interferes with the implicit service, that will be much appreciated!! -- This message was sent by Atlassian JIRA (v6.4.14#64029)