Hacker News new | ask | show | jobs
by troyk 4402 days ago
Doesn't mention imho the best feature of Go html templating, from the docs (http://golang.org/pkg/html/template/):

This package understands HTML, CSS, JavaScript, and URIs. It adds sanitizing functions to each simple action pipeline, so given the excerpt

  <a href="/search?q={{.}}">{{.}}</a>
At parse time each {{.}} is overwritten to add escaping functions as necessary. In this case it becomes

  <a href="/search?q={{. | urlquery}}">{{. | html}}</a>
.