dao_test.go 259 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "fmt"
  4. "sync"
  5. "go-common/app/job/main/passport-game-cloud/conf"
  6. )
  7. var (
  8. once sync.Once
  9. d *Dao
  10. )
  11. func startDao() {
  12. if err := conf.Init(); err != nil {
  13. panic(fmt.Sprintf("conf.Init() error(%v)", err))
  14. }
  15. d = New(conf.Conf)
  16. }