-
-
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
The RootPkg parameter is added for the api template. #3785
Comments
What application scenarios require specifying rootPkg? Currently goctl does not support external variables |
I need to use it when customizing the template. I don't want the package name using the template to be customized, but I want to use the currently generated package name. There may be different processing methods for different services, such as the official public Response example. , and I need to use the configuration center in my actual needs. The expected template is as follows: api/handler.tpl
api/main.tpl
|
a better solution is to open module variables. |
Hello, could you please open the module variable in the template to the outside? @kesonan |
I submitted a PR here. If you don’t have time to process it and this PR is available, you can combine it. Due to project progress, I can only use my version of goctl for development now. Please reply as soon as possible. |
I have already open go module variable for go template on api and rpc generator. use #3798 instead. |
When I customized the template, I found that the package name parameter was not given, which would cause my template and project to be strongly bound, but I don't want this.
refer:#2063
I don't know why this task was closed, but this should be very useful to everyone
The text was updated successfully, but these errors were encountered: