Skip to content
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 api go -api api.api -dir. --style go_zero cannot separate types.go problem #3757

Open
zhangforeverlu opened this issue Dec 5, 2023 · 9 comments

Comments

@zhangforeverlu
Copy link

zhangforeverlu commented Dec 5, 2023

Since my project uses goctl api go -api command, I use the types.go file generated by go-zero to maintain the input parameters. Now due to the surge in business, types.go is getting bigger and bigger. I hope that the framework goctl api go command It can be supported, and types.go can be split into multiple files according to its own business for easy maintenance..

image

@zhangforeverlu zhangforeverlu changed the title goctl api go -api api.api -dir . --style go_zero goctl api go -api api.api -dir. --style go_zero cannot separate types.go problem Dec 5, 2023
@kesonan
Copy link
Collaborator

kesonan commented Dec 5, 2023

The structures are global defines, so it have no package to separate files, and there has no plan to support it yet.

@fuckqqcom
Copy link

@zhangforeverlu 你有计划支持types分组嘛,可以一起搞下,我其他的一些自己fork处理完了,现在就剩types分组这块了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@zhangforeverlu Do you have any plans to support type grouping? We can work on it together. I have forked some of the others and now only the type grouping is left.

@jaronnie
Copy link
Contributor

jaronnie commented May 21, 2024

基于 go-zero 的 jzero 框架支持将 types.go 按照业务进行分组。同时支持一键生成代码。有兴趣的可以看看.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The jzero(https://github.com/jzero-io/jzero) framework based on go-zero supports grouping types.go according to business. It also supports one-click code generation. Those who are interested can take a look.

@jaronnie
Copy link
Contributor

也可以参考这里的实现完成 https://github.com/jzero-io/jzero/blob/main/cmd/gen/genapi.go

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You can also refer to the implementation here https://github.com/jzero-io/jzero/blob/main/cmd/gen/genapi.go

@fuckqqcom
Copy link

基于 go-zero 的 jzero 框架支持将 types.go 按照业务进行分组。同时支持一键生成代码。有兴趣的可以看看.

在线蹲作者。我也现在也魔改支持了,有链接方式嘛,可以加个微信什么的,组个交流群

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The jzero framework based on go-zero supports grouping types.go according to business. It also supports one-click code generation. Those who are interested can take a look.

Online squatting author. I also support Magic Change now. There is a link method. You can add WeChat or something and form a communication group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants