diff options
Diffstat (limited to 'plugin_lua.go')
-rw-r--r-- | plugin_lua.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin_lua.go b/plugin_lua.go index a0eecef..372c341 100644 --- a/plugin_lua.go +++ b/plugin_lua.go @@ -12,8 +12,8 @@ import ( type luaRoute struct { method string - path string - f *lua.LFunction + path string + f *lua.LFunction } type luaPlugin struct { @@ -94,8 +94,8 @@ func (p *luaPlugin) SetRoutes(group *echo.Group) { for _, r := range p.routes { group.Match([]string{r.method}, r.path, func(ctx echo.Context) error { err := p.state.CallByParam(lua.P{ - Fn: r.f, - NRet: 0, + Fn: r.f, + NRet: 0, Protect: true, }, luar.New(p.state, ctx)) if err != nil { |