Nothing here yet.
Jul 31, 2025 · 2 min read · There are many scenarios in which we want to create templates suitable for web applications. It is possible to write HTML templates dynamically using the text/template package, however using html/template makes your HTML templates injection-safe as i...
Join discussionJul 28, 2025 · 4 min read · My previous blog post introduced the feature of actions in templates. Another very similar feature is a function, which can be used together with an action to perform additional operations on the data. For example, {{ range }} is an action as it cont...
Join discussionJul 1, 2025 · 3 min read · My previous blog post introduced templates in Go by demoing how to produce a simple string using the template.New().Parse function. In this blog post, I will go over the steps on how to use the text/template package with loops and conditional logic t...
Join discussionJun 13, 2025 · 2 min read · Using templates in Go is a great way to produce content in a dynamic way. Go makes it possible to prepare content for display as pure text (by using the text/template package or as HTML with proper encoding (by using the html/template package). Both ...
Join discussion