Go Templates
summary
Bitly replaces the confusing stdlib docs with a tiny wrapper package called templater wrapper that loads all .html files from a directory with filepath.Glob, builds a map[string]template.Template of templates, injects a global funcMap and a base HTML file, and exposes two calls: LoadTemplates at startup and ExecuteTemplate(w, "page.html", data) in handlers. The implementation uses html/template, is under 100 lines, and makes handlers one-line template renders.
AI-written summary · about
related talks
44mCommand Line Scripting with Templates
04mAbusing text/template for data transformation
33mWrite Once, Use Many: A Handy Package to Call Internal HTTP APIs
29mBuild Your Developer Tools in Go
07mFirst Steps Into Web Server Development
51mGo Tooling in Action
25mHow I Write HTTP Web Services After 8 Years
33mGo Full Stack Server-Side Rendering vs SPAs
