tree: 35f9b635c9532fb7598326a182f7b4d0c2fa4f02 [path history] [tgz]
  1. parse/
  2. testdata/
  3. doc.go
  4. example_test.go
  5. examplefiles_test.go
  6. examplefunc_test.go
  7. exec.go
  8. exec_test.go
  9. funcs.go
  10. helper.go
  11. LICENSE
  12. multi_test.go
  13. README.md
  14. template.go
vendor/github.com/alecthomas/template/README.md

Go's text/template package with newline elision

This is a fork of Go 1.4's text/template package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline.

eg.

{{if true}}\
hello
{{end}}\

Will result in:

hello\n

Rather than:

\n
hello\n
\n