Show HN: Dstpierre/tpl a tiny lib making Go's templates more tolerable
3 dstpierre 0 7/5/2025, 11:18:28 AM github.com ↗
Hey, I'll start by saying I've had the authors of templ and Gomponents in my podcast and often use them.
But sometimes Go HTML templates is just what I need, and I never remember how the freaking parsing works so I have base layout and partials available.
I created tpl a long time ago and after running in prod for awhile now, I decided to release the v1.
It's nothing ground breaking, just a simple helper package that brings translations and i18n and an opiniated structure and parsing for Go HTML templates. There's some sane data structure that are mostly always used in all project, things like CurrentUser, Locale, Alert (for flash notification) and some Django's inspired template function like map, intcomma, naturaltime, etc.
Hope it can helps other, I'm using it which make it enough for me ;).
Dominic
No comments yet