自定义模板生成报错
- Dominant language
- Go
- Stars
- 8k
- Forks
- 918
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
使用kitex自定义模板生成报错

生成的目录结构

_default.go中的内容

PackageInfo.RealServiceName由tool/internal_package/generator/generator.go中的Config.ServiceName赋值,Config.ServiceName是通过-service参数指定的,但是-service参数和-template-dir是不能同时指定的,这好像矛盾了?
**To Reproduce**
创建两个文件夹tpl和idl,在idl中创建hello.thrift,tpl中创建default.yaml
```go
// hello.thrift
namespace go api
struct Request {
1: string message
}
struct Response {
1: string message
}
service Hello {
Response echo(1: Request req)
}
```
tpl/default.yaml用的是https://github.com/cloudwego/cwgo/blob/main/tpl/kitex/client/standard/default_tpl.yaml
运行命令 `kitex -module github.com/xxx/demo -service demo -template-dir tpl idl/hello.thrift`
**Expected behavior**
正确生成自定义模板
**Kitex version:**
v0.9.1
Contributor guide
Assessment
This issue has not been assessed yet.