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

封装统一格式的body响应,但是不修改go-zero原有代码生成模板 #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

1191226989
Copy link

由于修改生成代码模板来修改返回数据格式的方法需要考虑goctl版本问题,而且不能自定义code和msg内容,所以研究了一下,可以在logic层使用response方法来统一格式的body响应。

由于修改生成代码模板来修改返回数据格式的方法需要考虑goctl版本问题,而且不能自定义code和msg内容,所以研究了一下在logic模块写方法来统一格式的body响应。
@kesonan
Copy link
Collaborator

kesonan commented Jun 17, 2023

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

Successfully merging this pull request may close these issues.

None yet

2 participants