"github.com/gofiber/fiber/v2"
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Name: " + r.Name + ", ")
app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Method: " + r.Method + "\n")
app.Get("/add/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
app.Delete("/destroy/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
// Name: addUser, Method: GET
// Name: destroyUser, Method: DELETE