Skip to content

Commit

Permalink
docs: add pool adapter example
Browse files Browse the repository at this point in the history
  • Loading branch information
marcozac committed Dec 7, 2022
1 parent feac50a commit d7aa3f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func main() {
// Use the following if you use Redis with a specific user
// a, err := redisadapter.NewAdapterWithUser("tcp", "127.0.0.1:6379", "username", "password")

// Use the following if you use Redis connections pool
// pool := &redis.Pool{}
// a, err := redisadapter.NewAdapterWithPool(pool)

e := casbin.NewEnforcer("examples/rbac_model.conf", a)

// Load the policy from DB.
Expand Down

0 comments on commit d7aa3f0

Please sign in to comment.