浏览代码

fix goctl rpc protoc strings.EqualFold Service.Name GoPackage (#2046)

LeeDF 2 年之前
父节点
当前提交
96acf1f5a6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/goctl/rpc/generator/mkdir.go

+ 1 - 1
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()))
 	}