1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 20:07:04 +00:00

Update to version 12.1.6

Former-commit-id: 4d39e8a764a7c0d91b19a3710d8afe6c8c208c62
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-05 12:36:21 +02:00
parent d4e38da3ad
commit 9c97a8a668
14 changed files with 145 additions and 120 deletions

View File

@@ -125,16 +125,13 @@ func main() {
ctx.ViewData("showingAllDone", true)
ctx.ViewData("title", "Todos - All Done")
// Key does not actual matter at all here.
// However, you can enable it for better performance.
// In order to enable key mapping for
// jet specific renderer and ranger types
// you have to initialize the View Engine
// with `tmpl.DisableViewDataTypeCheck("_jet")`.
//
// Defaults to type checks, empty key.
ctx.ViewData("_jet", (&doneTODOs{}).New(todos))
ctx.View("todos/index.jet")
// Use ctx.ViewData("_jet", jetData)
// if using as middleware and you want
// to pre-set the value or even change it later on from another next middleware.
// ctx.ViewData("_jet", (&doneTODOs{}).New(todos))
// and ctx.View("todos/index.jet")
// OR
ctx.View("todos/index.jet", (&doneTODOs{}).New(todos))
})
port := os.Getenv("PORT")