Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group by params #178

Closed
ajf-sa opened this issue Jun 5, 2021 · 2 comments
Closed

group by params #178

ajf-sa opened this issue Jun 5, 2021 · 2 comments

Comments

@ajf-sa
Copy link
Contributor

ajf-sa commented Jun 5, 2021

Hi evereyone can we have example in grouping.md that show we can group router by params
something like this or example more simple

func main() {
  app := fiber.New()

  api := app.Group("/api")      // /api

  v1 := api.Group("/v1")        // /api/v1
  user := api.Group("/user")
  userID := user .Group("/:userID")
  v1.Get("/list", handler)      // /api/v1/list
  user.Get("/", handler)      // /api/v1/user
  userID.Get("/profile",handler) // /api/v1/user/1/profile
  userID.Put("/update",handler) // /api/v1/user/1/update

  log.Fatal(app.Listen(":3000"))
}
@ReneWerner87
Copy link
Member

https://docs.gofiber.io/guide/grouping#paths

Should be enough, otherwise you can also create a pull request, as long as the example fits well into the documentation, that would be okay.

@ajf-sa
Copy link
Contributor Author

ajf-sa commented Jun 17, 2021

ya... you right ,maybe I will in recipes! . Docs should be simple and clear ... thx :)

@ajf-sa ajf-sa closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants