From bfe239764b7d298325a2dce99d3ae4cbae1ddfb4 Mon Sep 17 00:00:00 2001 From: Davy xu Date: Wed, 11 Aug 2021 18:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AFid=E7=94=9F=E6=88=90=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E8=80=A6=E5=90=88=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codegen/msgid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen/msgid.go b/codegen/msgid.go index ab630bf..2a041db 100644 --- a/codegen/msgid.go +++ b/codegen/msgid.go @@ -26,7 +26,8 @@ func StructMsgID(d *model.Descriptor) (msgid int) { } if msgid == 0 { - msgid = int(stringHash(strings.ToLower(d.DescriptorSet.PackageName + d.Name))) + // 这里不能引入packageName, 不同语言的package设置为不同, 造成消息id不一致 + msgid = int(stringHash(strings.ToLower(d.Name))) } return