From b93d0dc9e45e00f30a9c6b7dd14efb368ed6bc38 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Thu, 21 Dec 2023 17:14:33 +0800 Subject: [PATCH] up --- example/nosql/redis/adapter/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/nosql/redis/adapter/main.go b/example/nosql/redis/adapter/main.go index 12747745933..96b7cc827ab 100644 --- a/example/nosql/redis/adapter/main.go +++ b/example/nosql/redis/adapter/main.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/gogf/gf/contrib/nosql/redis/v2" - _ "github.com/gogf/gf/contrib/nosql/redis/v2" "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/database/gredis" @@ -36,7 +35,7 @@ func (r *MyRedis) Do(ctx context.Context, command string, args ...interface{}) ( func main() { gredis.RegisterAdapterFunc(func(config *gredis.Config) gredis.Adapter { r := &MyRedis{redis.New(config)} - r.AdapterOperation = r + r.AdapterOperation = r // This is necessary. return r }) gredis.SetConfig(&config, group)