service_test.go 245 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "flag"
  4. "sync"
  5. "go-common/app/job/main/passport-encrypt/conf"
  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. s = New(conf.Conf)
  17. }