~rycwo/tmplgen

ref: 60311ec186054159020af72268bcdfefc684d33e tmplgen/README.md -rw-r--r-- 1.3 KiB
60311ec1Ryan Chan Add README note about artifact downloads 1 year, 10 months ago

#Overview

builds.sr.ht status

Simple wrapper around Go text/template to read self-contained template files and write generated results to a file.

This module depends on Sprig to provide additional template functions.

tmplgen is currently being used in Forge to generate source files. See vector.h.in for an example.

Pre-compiled binary releases can be downloaded from the refs page. Navigate to the required version and download the archive for your platform.

#Usage

Please refer to the text/template docs for details on the template syntax. Additional Sprig function docs can be found here.

# tmplgen -o <filename> <filename>
tmplgen -o foo.h foo.h.in

tmplgen can also read from stdin and write to stdout.

#License

Do what you want to!