You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thinking about how to design this. I foresee some non-string examples for this.
Let's say a PDF / Word document renderer wouldn't be happy with a string input so Render(tpl string) is not viable. I'm thinking either []byte or interface{} but I'd prefer not having interface parameters.
Would there be a situation that is not covered by []byte? Raw file contents and strings both work with that. @0SkillAllLuck
My current proposal would be Render(tpl []byte) error and the respective MustRender(tpl []byte) resulting in the proposed code snippet changing to:
I agree, an alternative would be to have a seperate ctx.RenderString(tpl string) function but that would be the worse option I think. So going with your suggestion @nilathedragon looks like the better way to me.
Description
It would be great, to have the possibility to render / show a custom HTML string and not only a path to a specific file.
Additional Context
No response
Code Snippet
Checklist:
The text was updated successfully, but these errors were encountered: