We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前的结构在service层写了所有的方法,每次调用时会比较难找到自己想要的方法 比如 目前的架构中 定义了 var ( UserSvc *Service VCodeSvc *Service ) 但是在handler中调用service.UserSvc时,ide也会提示VCodeSvc下的相关方法,有优化的方式吗
The text was updated successfully, but these errors were encountered:
可以把 service 按职责分开,比如用户一个service, 订单一个service, 分别有自己的New方法(NewUserService, NewOrderService),目前是一个大service, 一个New,所有的都在一个下面,就会有你说的这种问题。
Sorry, something went wrong.
谢谢解答!很有用!
No branches or pull requests
目前的结构在service层写了所有的方法,每次调用时会比较难找到自己想要的方法
比如 目前的架构中 定义了
var (
UserSvc *Service
VCodeSvc *Service
)
但是在handler中调用service.UserSvc时,ide也会提示VCodeSvc下的相关方法,有优化的方式吗
The text was updated successfully, but these errors were encountered: