## Overview [![builds.sr.ht status](https://builds.sr.ht/~rycwo/tmplgen.svg)](https://builds.sr.ht/~rycwo/tmplgen?) Simple wrapper around Go [text/template][pkg-template] to read **self-contained** template files and write generated results to a file. This module depends on [Sprig][sprig] to provide additional template functions. `tmplgen` is currently being used in [Forge][forge] to generate source files. See [`vector.h.in`][forge-vec] for an example. ## Usage Please refer to the [text/template docs][pkg-template] for details on the template syntax. Additional Sprig function docs can be [found here][sprig-funcs]. ```sh # tmplgen -o tmplgen -o foo.h foo.h.in ``` `tmplgen` can also read from stdin and write to stdout. ## License [Do what you want to!](LICENSE) [forge-vec]: https://git.sr.ht/~rycwo/forge/tree/master/item/include/forge/vector.h.in [forge]: https://git.sr.ht/~rycwo/forge/ [pkg-template]: https://golang.org/pkg/text/template/ [sprig-funcs]: http://masterminds.github.io/sprig/ [sprig]: https://github.com/Masterminds/sprig