service_test.go 264 B

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