package common import ( "strings" "github.com/gofiber/fiber/v2" ) func Page(path string) (func(c *fiber.Ctx) error) { page_id := strings.ReplaceAll(path, "/", "-") + "-page" return func (c *fiber.Ctx) error { return c.Render(path, fiber.Map{"PageId": page_id}) } }