package service type Service struct { User *UserService Captcha *CaptchaService LoginLog *LoginLogService Common *CommonService Item *ItemService File *FileService Recomment *RecommentService } func InitService() *Service { s := new(Service) s.User = new(UserService) s.Captcha = new(CaptchaService) s.LoginLog = new(LoginLogService) s.Common = new(CommonService) s.Item = new(ItemService) s.File = new(FileService) s.Recomment = new(RecommentService) return s }