go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

goctl specifications and recommendations

Open sunviv opened this issue 2 years ago • 7 comments

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'.

sunviv avatar Dec 19 '23 02:12 sunviv

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

fucktx avatar Dec 19 '23 06:12 fucktx

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.

kesonan avatar Dec 22 '23 08:12 kesonan

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?

sunviv avatar Dec 27 '23 06:12 sunviv

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

fucktx avatar Dec 27 '23 07:12 fucktx

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


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

Issues-translate-bot avatar Dec 27 '23 07:12 Issues-translate-bot

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

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

kesonan avatar Jan 03 '24 03:01 kesonan

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

Issues-translate-bot avatar Jan 03 '24 11:01 Issues-translate-bot