go-zero
go-zero copied to clipboard
goctl api code generation error encountered.
Describe the bug Code generation error encountered.
To Reproduce I use the command:
-
The code is
goctl api go --api "./service/api/shiva.api" --dir "./service/api" --home "./service/api/.goctl"
-
The error is
2022/07/18 12:34:57 template: handlerTemplate:6:6: executing "handlerTemplate" at <.After1_1_10>: can't evaluate field After1_1_10 in type gogen.handlerInfo
Expected behavior success
Screenshots
Environments (please complete the following information):
- OS: mac os
- go-zero version v1.3.4
- goctl version v1.3.9
More description Add any other context about the problem here.
I had the same problem
How do you solve this problem
goctl version 1.3.9 windows/amd64
There is a problem in 1.3.9. If you go back to 1.3.8, you will be fine
Try it in v1.4.0
Try it in v1.4.0
still error
If you are a custom template, you can refer to the latest handler.tpl content to adjust the latest template has been moved out of the After1_1_10
variable, if not a custom template please first execute goctl template clean
, and then goctl template init
to reinitialize
This issue is stale because it has been open for 30 days with no activity.