Skip to content

Comment on Ask HN: What GO web framework do you use?parent

Comments

templates package

How do you like the template package ? Can you compare it to Jinja/Twig ?

I have never used Jinja/Twig, but I have used handlebars, ERB, JSX and other similar templating systems.

Overall, I find Go's template system to be a bit clunky but it certainly gets the job done. The template system is fairly minimal so it feels mostly like working with HTML, but it gives you a few tools to use.. mainly passing data down the template/sub-templates and the ability to define template functions/helpers. Minimal... but it's all you really need.

I converted my business from Rails 5 to Go about a year ago and the ERB was fairly straight forward to convert to Go's template system.. it felt like I was mostly converting <% .. %> to {{ .. }} and changing <%= render ... %> to {{ template ... }}

Thanks, I guess I should try the standard lib before anything else then.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.