Updated usage examples
This commit is contained in:
parent
1f62562d70
commit
b6fec17b49
1 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue