From b02ea389b7b6d461d10ef7c327d16ee9c4a4224d Mon Sep 17 00:00:00 2001 From: lyric Date: Tue, 10 Sep 2019 22:37:12 +0800 Subject: [PATCH] Update usage --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 219be21..e07c757 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ $ go get -u -v gopkg.in/go-oauth2/redis.v3 package main import ( - "gopkg.in/go-oauth2/redis.v3" + "github.com/go-redis/redis" + oredis "gopkg.in/go-oauth2/redis.v3" "gopkg.in/oauth2.v3/manage" ) @@ -22,13 +23,13 @@ func main() { manager := manage.NewDefaultManager() // use redis token store - manager.MapTokenStorage(redis.NewRedisStore(&redis.Options{ + manager.MapTokenStorage(oredis.NewRedisStore(&redis.Options{ Addr: "127.0.0.1:6379", DB: 15, })) // use redis cluster store - // manager.MapTokenStorage(redis.NewRedisClusterStore(&redis.ClusterOptions{ + // manager.MapTokenStorage(oredis.NewRedisClusterStore(&redis.ClusterOptions{ // Addrs: []string{"127.0.0.1:6379"}, // DB: 15, // }))