1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

增加SetRedisPool方法 (#265)

* 添加TODO:待完善接口

* 【模板消息】将message.DataItem改为message.TemplateDataItem

* fix PKG.DEV

* 增加一个 SetRedisPool 方法
This commit is contained in:
silenceper
2020-05-30 12:38:51 +08:00
committed by GitHub
parent c4cb394d80
commit 2af3f42055

5
cache/redis.go vendored
View File

@@ -45,6 +45,11 @@ func NewRedis(opts *RedisOpts) *Redis {
return &Redis{pool}
}
//SetRedisPool 设置redis连接池
func (r *Redis) SetRedisPool(pool *redis.Pool) {
r.conn = pool
}
//SetConn 设置conn
func (r *Redis) SetConn(conn *redis.Pool) {
r.conn = conn