File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 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 {
2828
2929// NewRedisStoreWithCli create an instance of a redis store
3030func 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 ... )
3932}
4033
4134// NewRedisClusterStore create an instance of a redis cluster store
@@ -48,6 +41,11 @@ func NewRedisClusterStore(opts *redis.ClusterOptions, keyNamespace ...string) *T
4841
4942// NewRedisClusterStoreWithCli create an instance of a redis cluster store
5043func 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 {
5149 store := & TokenStore {
5250 cli : cli ,
5351 }
You can’t perform that action at this time.
0 commit comments