service_test.go 214 B

123456789101112131415161718
  1. package service
  2. import (
  3. "go-common/app/job/main/identify/conf"
  4. "sync"
  5. )
  6. var (
  7. once sync.Once
  8. s *Service
  9. )
  10. func startService() {
  11. if err := conf.Init(); err != nil {
  12. panic(err)
  13. }
  14. s = New(conf.Conf)
  15. }