|
@@ -1,9 +1,6 @@
|
|
|
package utils
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
- "rdluck_tools/cache"
|
|
|
-
|
|
|
beeLogger "github.com/beego/bee/v2/logger"
|
|
|
"github.com/beego/beego/v2/server/web"
|
|
|
)
|
|
@@ -13,9 +10,6 @@ var (
|
|
|
MYSQL_URL string //数据库连接
|
|
|
MYSQL_URL_DATA string
|
|
|
|
|
|
- REDIS_CACHE string //缓存地址
|
|
|
- Rc *cache.Cache //redis缓存
|
|
|
- Re error //redis错误
|
|
|
)
|
|
|
|
|
|
func init() {
|
|
@@ -33,16 +27,6 @@ func init() {
|
|
|
MYSQL_URL = config["mysql_url"]
|
|
|
MYSQL_URL_DATA = config["mysql_url_data"]
|
|
|
|
|
|
- REDIS_CACHE = config["beego_cache"]
|
|
|
- if len(REDIS_CACHE) <= 0 {
|
|
|
- panic("redis链接参数没有配置")
|
|
|
- }
|
|
|
- Rc, Re = cache.NewCache(REDIS_CACHE) //初始化缓存
|
|
|
- if Re != nil {
|
|
|
- fmt.Println(Re)
|
|
|
- panic(Re)
|
|
|
- }
|
|
|
-
|
|
|
if RunMode == "release" {
|
|
|
|
|
|
} else {
|