mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 04:47:02 +00:00
examples: use ctx.ResponseWriter().Naive().(http.Pusher) instead
Former-commit-id: 7802f4eadf2b1c0a0d2a42ed5ebac3e5c77f88cc
This commit is contained in:
@@ -97,8 +97,11 @@ func main() {
|
||||
}
|
||||
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.View("todos/index.jet", todos) // <--
|
||||
err := ctx.View("todos/index.jet", todos) // <--
|
||||
// Note that the `ctx.View` already logs the error if logger level is allowing it and returns the error.
|
||||
if err != nil {
|
||||
ctx.StopWithText(iris.StatusInternalServerError, "Templates not rendered!")
|
||||
}
|
||||
})
|
||||
|
||||
app.Get("/todo", func(ctx iris.Context) {
|
||||
|
||||
Reference in New Issue
Block a user