zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.32k stars 3.96k forks source link

goctl specifications and recommendations #3805

Open sunviv opened 11 months ago

sunviv commented 11 months ago

Could you unify the usage specifications of the goctl? goctl model mysql ddl --src user.sql --dir . goctl api go --api user.api --dir . Why not change the input files to --src and the output files to --dir

It is recommended to add the function of modifying the generated file name image In the logic directory, I don't want the generated filenames to contain '_logic'.

fuckqqcom commented 11 months ago

@sunviv 看我fork的一个版本,我目前都去掉了这些,

image
kesonan commented 11 months ago

Thanks for the feedback. In the early, goctl was developed by multiple people, each with the same hobby. At first, everyone focused on solving problems. When these problems were discovered, it was too late to modify them.

sunviv commented 10 months ago

Thanks for the feedback. In the early, goctl was developed by multiple people, each with the same hobby. At first, everyone focused on solving problems. When these problems were discovered, it was too late to modify them.

And how to modify the file name generated by goctl?

fuckqqcom commented 10 months ago

@kesonan 有打算给types支持分组的计划嘛

Issues-translate-bot commented 10 months ago

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


@kesonan Do you have any plans to support grouping for types?

kesonan commented 10 months ago

@kesonan 有打算给types支持分组的计划嘛

There is no plan support, the API does not have the concept of packages, grouping will bring negative effects and duplicate code

Issues-translate-bot commented 10 months ago

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


@sunviv https://github.com/go-sh/go-zero/commit/9da3b6839811e92df608bb5a19fd2bdcac9cfba7 You can try this branch