fiber.go 555 B

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