How could you get the ace templating system to work with Gin?
Comment From: Thomasdezeeuw
I believe that is the default template engine in Gin, although I'm not 100% sure.
Comment From: apriendeau
It currently uses http://golang.org/pkg/html/template/
Comment From: qcam
polite ping from me! Can I know if Ace template could be used with Gin?
Comment From: apriendeau
Currently, after checking, it still uses "text/html"
Comment From: robvdl
You should be able to make your own custom renderer, though I don't think custom renderers are officially documented, but I figured out how to use them anyway and created a custom template library for GIN and Pongo2 templates here https://github.com/robvdl/pongo2gin
That was forked and another renderer was made for Jade templates https://github.com/MAD-GooZe/jaderender so I can't see a reason why you can't make one for ACE templates in a similar way.
Comment From: robvdl
If you need some help, I should be able to whip up a similar renderer for ace templates in a day or so, just let me know, or you could do it yourself... it's upto you.
Comment From: jm-janzen
See PR showing minimal example of how to use Gin with Ace templating here: https://github.com/gin-gonic/examples/pull/186.
Just adding this here, because it was one of the first results when I searched for this question. But as you can see from the PR it's not nearly as onerous as you might think at first (in no small part thanks to improvements over the last decade).
Comment From: robvdl
Pongo2gin has since moved, it's under gitlab.com/go-box/pongo2gin
It really isn't hard to get Gin to use another template engine to be honest, you could make a lot of these little glue libraries that add support for other template engines in Gin.
I ended up only making two and just keep those maintained, I stopped there.
But I did think about a library that supported various template engines rather than a library for each one.