TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Templar – Declaring Dependencies in Go Templates

1 pointsby flashgordon27 days ago
I&#x27;ve been working with Go&#x27;s templating libraries for a while and kept running into the same issue: managing dependencies between templates.<p>The standard libraries (text&#x2F;template and html&#x2F;template) are great, but they lack built-in declaralation for dependencies and you have to resort to code to carefully curate and load your templates in a particular order.<p>So I wrote a little library that acts as a preprocessor (with a few loader utilities to kick it off) to manage dependencies at the point of authoring so context is all now local. The goal of this is to just provide some basic building blocks for declaring and resolving dependencies. Goal is NOT to be a full fledged templating library or anything like that (Pongo and Templ do a lot here). I just did not want to stray from - at-least what I felt was - a pretty solid Go&#x27;s stdlib and templating syntax.<p>Would love to get feedback (and contributors&#x2F;help ofcourse). Would this be something y&#x27;all would find useful?

no comments

no comments