Skip to content

Commit

Permalink
mod: add IContext func
Browse files Browse the repository at this point in the history
  • Loading branch information
Говорухин Егор Владимирович committed Jun 20, 2023
1 parent 9832340 commit 1681384
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ type Context struct {
ctx echo.Context
}

func IContext(ctx echo.Context) Context {
return Context{
ctx: ctx,
}
}

func (c *Context) Render(name string, data interface{}, layouts ...string) error {
return c.ctx.Render(200, name, data)
}
Expand Down

0 comments on commit 1681384

Please sign in to comment.