diff --git a/redis.go b/redis.go index 2249282..f5dc9ba 100755 --- a/redis.go +++ b/redis.go @@ -43,6 +43,10 @@ func (r *Store) Init(opts ...options.Option) error { return r.configure() } +func (r *Store) Redis() *redis.Client { + return r.cli.(*redis.Client) +} + func (r *Store) Disconnect(ctx context.Context) error { return r.cli.Close() } diff --git a/redis_test.go b/redis_test.go index ba2f688..e961808 100755 --- a/redis_test.go +++ b/redis_test.go @@ -72,11 +72,11 @@ func Test_rkv_configure(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - r := &Store{ + rc := &Store{ opts: tt.fields.options, cli: tt.fields.Client, } - err := r.configure() + err := rc.configure() if (err != nil) != tt.wantErr { t.Errorf("configure() error = %v, wantErr %v", err, tt.wantErr) return