这些地方为什么不用单例呢?
sllt opened this issue · comments
像这些地方:
提供一种重构思路:
var Customer = new(customerService)
type customerService struct {}
func (c *customerService) Paginate(name string, offset int, pageSize int) ([]models.Customer, int64) {
}
....
调用:
service.Customer.Paginate(your params...)
感谢,多租户重构时候会参考您的意见