File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,7 @@ func NewRedisStore(opts *redis.Options, keyNamespace ...string) *TokenStore {
28
28
29
29
// NewRedisStoreWithCli create an instance of a redis store
30
30
func NewRedisStoreWithCli (cli * redis.Client , keyNamespace ... string ) * TokenStore {
31
- store := & TokenStore {
32
- cli : cli ,
33
- }
34
-
35
- if len (keyNamespace ) > 0 {
36
- store .ns = keyNamespace [0 ]
37
- }
38
- return store
31
+ return NewRedisStoreWithInterface (cli , keyNamespace ... )
39
32
}
40
33
41
34
// NewRedisClusterStore create an instance of a redis cluster store
@@ -48,6 +41,11 @@ func NewRedisClusterStore(opts *redis.ClusterOptions, keyNamespace ...string) *T
48
41
49
42
// NewRedisClusterStoreWithCli create an instance of a redis cluster store
50
43
func NewRedisClusterStoreWithCli (cli * redis.ClusterClient , keyNamespace ... string ) * TokenStore {
44
+ return NewRedisStoreWithInterface (cli , keyNamespace ... )
45
+ }
46
+
47
+ // NewRedisStoreWithInterface create an instance of a redis store
48
+ func NewRedisStoreWithInterface (cli clienter , keyNamespace ... string ) * TokenStore {
51
49
store := & TokenStore {
52
50
cli : cli ,
53
51
}
You can’t perform that action at this time.
0 commit comments