gofiber/template

Pug Attribute Interpolation Not Accepted By View Engine

alphonso06 opened this issue · 1 comments

I'm trying to work with Pug's Attribute Interpolation.

But for example, if I want to render a link that has some query parameters from the server with it:

v1.Get("/layout", func(c *fiber.Ctx) error {
	return c.Render("index", fiber.Map{
		"value": "some-important-string-goes-here",
	}, "layouts/main")
})
a(href=`/somewhere?key=${value}`) Link

I would instead get an error:

views: template: index:15: bad number syntax: "+v"

I'm trying to figure out the subtle differences between this view engine and the one's described in Pug's official documentation. Any ideas what I'm doing wrong? Thanks. 😁

have you found the root cause ?