A small project that collects various nice things to get started with Go Web Development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
282 B

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})
}
}