Skip to content

Commit

Permalink
Fix compilation error in Casbin Auth Middleware's sample code (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
MasatoshiTada authored and vishr committed Jan 15, 2020
1 parent 9b5dc19 commit e186b4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/content/middleware/casbin-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ import (

```go
e := echo.New()
e.Use(casbin_mw.Middleware(casbin.NewEnforcer("casbin_auth_model.conf", "casbin_auth_policy.csv")))
enforcer, err := casbin.NewEnforcer("casbin_auth_model.conf", "casbin_auth_policy.csv")
e.Use(casbin_mw.Middleware(enforcer))
```

For syntax, see: [Syntax for Models](https://casbin.org/docs/en/syntax-for-models).
Expand Down

0 comments on commit e186b4f

Please sign in to comment.