Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz committed Dec 21, 2023
1 parent e28f844 commit b93d0dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions example/nosql/redis/adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b93d0dc

Please # to comment.