Bug Description
I've upgraded to Fiber v3.0.0, but noticed all my pages had empty content.
After messing around I've found out that fiber.Map has changed to map[string]any. Manually changing it to map[string]interface{} from fiber.Map works.
I expected fiber.Map to still work in v3 because in the documentation it uses it to pass data.
This only happens in the Django engine, not using the HTML one.
How to Reproduce
Steps to reproduce the behavior:
- Install
github.com/gofiber/fiber/v3 v3.0.0
- Install
github.com/gofiber/template/django/v3 v3.1.14
- Paste the code snippet from the last section into
main.go
- Create a
views/index.html file with this content: A {{Title}} B
Expected Behavior
The template should display this like in v2:
A This is some content B
But it displays in v3:
A B
Template package Version
v3.1.14
Code Snippet (optional)
package main
import (
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/django/v3"
)
func main() {
engine := django.New("./views", ".html")
app := fiber.New(fiber.Config{
Views: engine,
})
app.Get("/", func(c fiber.Ctx) error {
return c.Render("index", fiber.Map{"Title": "This is some content"})
})
app.Listen(":3000")
}
Checklist:
Bug Description
I've upgraded to Fiber v3.0.0, but noticed all my pages had empty content.
After messing around I've found out that
fiber.Maphas changed tomap[string]any. Manually changing it tomap[string]interface{}fromfiber.Mapworks.I expected
fiber.Mapto still work in v3 because in the documentation it uses it to pass data.This only happens in the Django engine, not using the HTML one.
How to Reproduce
Steps to reproduce the behavior:
github.com/gofiber/fiber/v3 v3.0.0github.com/gofiber/template/django/v3 v3.1.14main.goviews/index.htmlfile with this content:A {{Title}} BExpected Behavior
The template should display this like in v2:
A This is some content BBut it displays in v3:
A BTemplate package Version
v3.1.14
Code Snippet (optional)
Checklist: