From d3e6d57574c33dd87be185d897022a5c35b9072c Mon Sep 17 00:00:00 2001 From: davyxu Date: Fri, 30 Oct 2020 23:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AFid=E7=94=9F=E6=88=90=E6=97=B6?= =?UTF-8?q?,=20=E4=BD=BF=E7=94=A8=E5=85=A8=E5=B0=8F=E5=86=99=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=90=8D,=20=E9=81=BF=E5=85=8D=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- msgidutil/msgid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msgidutil/msgid.go b/msgidutil/msgid.go index c08ce10..cd0e966 100644 --- a/msgidutil/msgid.go +++ b/msgidutil/msgid.go @@ -9,6 +9,7 @@ import ( "github.com/davyxu/protoplus/model" "io/ioutil" "os" + "strings" ) var skipDupCacheMsgIDTips bool // 跳过重复缓存消息ID的警告提示 @@ -174,7 +175,7 @@ func StructMsgID(d *model.Descriptor) (msgid int) { if *flagAutoMsgIDCacheFile != "" { msgid = autogenMsgIDByCacheFile(*flagAutoMsgIDCacheFile, d) } else if msgid == 0 { - msgid = int(StringHash(d.DescriptorSet.PackageName + d.Name + *flagMsgIDSalt)) + msgid = int(StringHash(strings.ToLower(d.DescriptorSet.PackageName + d.Name + *flagMsgIDSalt))) } if *flagCheckDuplicateMsgID {