service_test.go 270 B

12345678910111213141516171819202122
  1. package service
  2. import (
  3. "flag"
  4. "go-common/app/admin/main/videoup-task/conf"
  5. )
  6. var s *Service
  7. func Init() {
  8. if s != nil {
  9. return
  10. }
  11. flag.Set("conf", "../cmd/videoup-task-admin.toml")
  12. if err := conf.Init(); err != nil {
  13. panic(err)
  14. }
  15. s = New(conf.Conf)
  16. }