mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
fix example as reported as #1390
Former-commit-id: 0864cdb5a77b75919e733dab29a85767333de7f8
This commit is contained in:
@@ -70,7 +70,7 @@ func main() {
|
|||||||
// this will be executed by the MyContext.Context
|
// this will be executed by the MyContext.Context
|
||||||
// if MyContext is not directly define the View function by itself.
|
// if MyContext is not directly define the View function by itself.
|
||||||
app.Handle("GET", "/hi/{firstname:alphabetical}", recordWhichContextJustForProofOfConcept, func(ctx iris.Context) {
|
app.Handle("GET", "/hi/{firstname:alphabetical}", recordWhichContextJustForProofOfConcept, func(ctx iris.Context) {
|
||||||
firstname := ctx.Values().GetString("firstname")
|
firstname := ctx.Params().Get("firstname") // ctx.Values().GetString("firstname")
|
||||||
|
|
||||||
ctx.ViewData("firstname", firstname)
|
ctx.ViewData("firstname", firstname)
|
||||||
ctx.Gzip(true)
|
ctx.Gzip(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user