We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b5dc19 commit e186b4fCopy full SHA for e186b4f
website/content/middleware/casbin-auth.md
@@ -34,7 +34,8 @@ import (
34
35
```go
36
e := echo.New()
37
-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")
38
+e.Use(casbin_mw.Middleware(enforcer))
39
```
40
41
For syntax, see: [Syntax for Models](https://casbin.org/docs/en/syntax-for-models).
0 commit comments