package service import ( "gorm.io/gorm" "kpt.notice/apiserver/config" "kpt.notice/apiserver/dao" ) var svc *Service type Service struct { DB *gorm.DB } func New(c *config.Config) (s *Service) { dao := dao.New(c) s = &Service{ DB: dao.DB, } svc = s JobInit() return }