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:
5
cache/redis.go
vendored
5
cache/redis.go
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user