Fiber: 馃尶 v1.12.x Changelog

Created on 27 May 2020  路  5Comments  路  Source: gofiber/fiber

馃敟 New
-

馃Ч Updates
-

  • The hyphen (-) and the dot (.) are now interpreted literally in paths, they can be used along with route parameters for useful purposes. Thank you @ReneWerner87
// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
  c.Params("genus")   // prunus
  c.Params("species") // persica
})

// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) {
  c.Params("from")   // LAX
  c.Params("to")     // SFO
})

馃┕ Fixes
-

Most helpful comment

@invipal in the last version we had put more focus on stability, user friendliness and performance, so the feature has been dropped

but it will come in the next versions, i will work on it in the next days

All 5 comments

If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

What about hyphens in routes? It was planned for V1.11.

@invipal in the last version we had put more focus on stability, user friendliness and performance, so the feature has been dropped

but it will come in the next versions, i will work on it in the next days

@invipal hyphen support is now available v1.12.+

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
  c.Params("genus")   // prunus
  c.Params("species") // persica
})

// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) {
  c.Params("from")   // LAX
  c.Params("to")     // SFO
})

Thank you @Fenny, with this feature, Fiber now fully met our expectation for developing our next project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeyraj picture jeyraj  路  4Comments

lucasmdomingues picture lucasmdomingues  路  3Comments

faultable picture faultable  路  3Comments

Badrouu17 picture Badrouu17  路  4Comments

MohamedGouaouri picture MohamedGouaouri  路  3Comments