package init_serve import ( "eta_gn/eta_bridge/global" "eta_gn/eta_bridge/utils" "fmt" ) func Redis() { var conf string conf = fmt.Sprintf(`{"key":"redis","conn":"%s","password":"%s"}`, global.CONFIG.Redis.Address, global.CONFIG.Redis.Password) redisClient, err := utils.InitRedis(global.CONFIG.Redis.ServeType, conf) if err != nil { fmt.Println("redis链接异常:", err) panic(any(err)) } global.Rc = redisClient }