-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goctl template --home 指定自定义模板目录不生效 #1330
Comments
so do I |
感谢反馈,这个问题已经发现了,目前我们已经在讨论这个解决方案,目前的解决方案是在通过 |
突然有一个想法,是否可以根据goctl的当前版本来自动判断加载哪个目录。或者是,将版本作为一个参数传入。 |
这个问题在哪个版本解决掉了呀?我go-zero 1.6.3 版本还是有这个问题 |
In which version has this problem been solved? I still have this problem in go-zero 1.6.3 version |
@kesonan 这个问题在哪个版本解决掉了呀?我go-zero 1.6.3 版本还是有这个问题 |
@kesonan In which version has this problem been solved? I still have this problem in go-zero 1.6.3 version |
我还是用中文描述吧!
Describe the bug
goctl release v1.2.4 使用 --home 指定自定义模板目录不生效
版本:
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
The error is
我修改了默认模板中 api 的 handler 和 logic 模板
api/handler.tpl
和api/logic.tpl
,通过上面的命令生成后发现还是使用的默认自带的模板。更具体一点,我是参照 https://go-zero.dev/cn/template.html 这个例子,更改了 handler 中的返回格式 将
httpx.OkJson(w, body)
改成了reponse.Response(w, resp, err)
这种。开始我以为是目录的问题,然后我就放到了
~/.goctl
下面,测试发现还是不生效。后来我又换回了之前使用的 goctl v1.2.1 , 发现这个是生效的。所以怀疑是 v1.2.4 有问题。
Expected behavior
A clear and concise description of what you expected to happen.
Environments (please complete the following information):
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: