소스 검색

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