TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Templar – Declaring Dependencies in Go Templates

1 点作者 flashgordon28 天前
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?

暂无评论

暂无评论