1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-23 12:03:49 +00:00

Update README.md

This commit is contained in:
Vic Shóstak 2020-06-19 13:17:37 +03:00 committed by GitHub
parent dbdfdc5fbe
commit 5f1b711fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
.github/README.md vendored
View File

@ -162,14 +162,14 @@ func main() {
// GET /plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
c.Params("genus") // => prunus
c.Params("species") // => persica
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) {
c.Params("from") // => LAX
c.Params("to") // => SFO
fmt.Printf("From: %s, To: %s", c.Params("from"), c.Params("to"))
// => From: LAX, To: SFO
})
// GET /api/register