From dc9ad50e765a33f0cb0729cf3ee3c5ca33c4553d Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Fri, 1 Nov 2019 16:07:17 +0200 Subject: [PATCH] fix example as reported as #1390 Former-commit-id: 0864cdb5a77b75919e733dab29a85767333de7f8 --- _examples/routing/custom-context/method-overriding/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_examples/routing/custom-context/method-overriding/main.go b/_examples/routing/custom-context/method-overriding/main.go index dbbdd05d..826dcd8f 100644 --- a/_examples/routing/custom-context/method-overriding/main.go +++ b/_examples/routing/custom-context/method-overriding/main.go @@ -70,7 +70,7 @@ func main() { // this will be executed by the MyContext.Context // if MyContext is not directly define the View function by itself. 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.Gzip(true)