mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-23 10:23:50 +00:00
Update README_zh-CN.md
This commit is contained in:
parent
6e74dfe71a
commit
e310d12c79
12
.github/README_zh-CN.md
vendored
12
.github/README_zh-CN.md
vendored
@ -158,6 +158,18 @@ func main() {
|
||||
fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
|
||||
// => Name: john, Age:
|
||||
})
|
||||
|
||||
// GET /plantae/prunus.persica
|
||||
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
|
||||
fmt.Printf("Genius: %s, Species: %s", c.Params("genus"), c.Params("species"))
|
||||
// => Genius: prunus, Species: persica
|
||||
})
|
||||
|
||||
// GET /flights/LAX-SFO
|
||||
app.Get("/flights/:from-:to", func(c *fiber.Ctx) {
|
||||
fmt.Printf("From: %s, To: %s", c.Params("from"), c.Params("to"))
|
||||
// => From: LAX, To: SFO
|
||||
})
|
||||
|
||||
// GET /api/register
|
||||
app.Get("/api/*", func(c *fiber.Ctx) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user