fiber.go 632 B

123456789101112131415161718192021222324252627
  1. package test
  2. import (
  3. "github.com/gofiber/fiber/v2"
  4. "github.com/gofiber/template/html/v2"
  5. "git.dmitriygnatenko.ru/dima/dmitriygnatenko-v2/internal/templates/functions"
  6. )
  7. func GetFiberTestConfig() fiber.Config {
  8. engine := html.New("./../../templates", ".html")
  9. engine.AddFunc("now", functions.Now)
  10. engine.AddFunc("noescape", functions.NoEscape)
  11. engine.AddFunc("concat", functions.Concat)
  12. engine.AddFunc("gridsep", functions.GridSep)
  13. engine.AddFunc("trans", functions.Trans)
  14. engine.AddFunc("link", functions.Link)
  15. engine.AddFunc("version", func() string {
  16. return "1"
  17. })
  18. return fiber.Config{
  19. Views: engine,
  20. }
  21. }