Updated usage examples

This commit is contained in:
Eduard Urbach 2024-06-19 10:50:41 +02:00
parent 818e0054c1
commit 24b7c6ead7
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -26,12 +26,12 @@ s.Get("/", func(ctx web.Context) error {
// Parameter route
s.Get("/blog/:post", func(ctx web.Context) error {
return ctx.String(ctx.Get("post"))
return ctx.String(ctx.Request().Param("post"))
})
// Wildcard route
s.Get("/images/*file", func(ctx web.Context) error {
return ctx.String(ctx.Get("file"))
return ctx.String(ctx.Request().Param("file"))
})
s.Run(":8080")