From 2af3f42055e9ae6a0e460994d6bd58186442266d Mon Sep 17 00:00:00 2001 From: silenceper Date: Sat, 30 May 2020 12:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0SetRedisPool=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20(#265)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加TODO:待完善接口 * 【模板消息】将message.DataItem改为message.TemplateDataItem * fix PKG.DEV * 增加一个 SetRedisPool 方法 --- cache/redis.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cache/redis.go b/cache/redis.go index bf422f0..5d6b8f3 100644 --- a/cache/redis.go +++ b/cache/redis.go @@ -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