Exemple #1
0
func init() {
	config := conf.NewConfig()
	force := false   // 强制重新建表
	verbose := false // 打印SQL语句
	orm.Debug = true

	orm.RegisterDriver("mysql", orm.DR_MySQL)
	orm.RegisterDataBase("default", "mysql", config.WX_MYSQL_CONN)
	wechat.RegDB()
	orm.RunSyncdb("default", force, verbose)
}
Exemple #2
0
func init() {
	config = conf.NewConfig()
}
Exemple #3
0
func init() {
	config = conf.NewConfig()
	redcli.Addr = config.REDIS_ADDR
}
Exemple #4
0
func init() {
	config = conf.NewConfig()
	redcli.Addr = config.REDIS_ADDR
	log = log.New(os.Stdout, "CKEYER - ", log.LstdFlags)
}