From 96acf1f5a698937198b2087419b795e406e62a17 Mon Sep 17 00:00:00 2001 From: LeeDF <757431363@qq.com> Date: Sat, 9 Jul 2022 23:40:32 +0800 Subject: [PATCH] fix goctl rpc protoc strings.EqualFold Service.Name GoPackage (#2046) --- tools/goctl/rpc/generator/mkdir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/goctl/rpc/generator/mkdir.go b/tools/goctl/rpc/generator/mkdir.go index b5ea23dd..5f3d5814 100644 --- a/tools/goctl/rpc/generator/mkdir.go +++ b/tools/goctl/rpc/generator/mkdir.go @@ -71,7 +71,7 @@ func mkdir(ctx *ctx.ProjectContext, proto parser.Proto, _ *conf.Config, c *ZRpcC } callDir := filepath.Join(ctx.WorkDir, strings.ToLower(stringx.From(proto.Service.Name).ToCamel())) - if strings.EqualFold(proto.Service.Name, proto.GoPackage) { + if strings.EqualFold(proto.Service.Name, filepath.Base(proto.GoPackage)) { callDir = filepath.Join(ctx.WorkDir, strings.ToLower(stringx.From(proto.Service.Name+"_client").ToCamel())) }