dao_test.go 317 B

12345678910111213141516171819202122
  1. package dao
  2. import (
  3. "time"
  4. "go-common/app/service/openplatform/ticket-item/conf"
  5. "go-common/library/log"
  6. )
  7. func initConf() {
  8. if err := conf.Init(); err != nil {
  9. panic(err)
  10. }
  11. log.Init(conf.Conf.Log)
  12. defer log.Close()
  13. }
  14. func startService() {
  15. initConf()
  16. d = New(conf.Conf)
  17. time.Sleep(time.Second * 2)
  18. }