Documentation
¶
Overview ¶
Package main demonstrates multi-file text generation with NewTextSet.
This is the "code / config generator" use case: the output is YAML meant for another template engine (Task runner), so HTML-escape would corrupt it ({{ becomes {{). NewTextSet never escapes.
The scaffold directory contains a Taskfile.yml.tmpl that uses {% include %} to pull in header.tmpl and footer.tmpl, and emits literal Task-runner variables using string-literal interpolation (e.g. {{ "{{.GOBIN}}" }}).
Run:
go run ./examples/multifile_text
Click to show internal directories.
Click to hide internal directories.