📂File Structure
Before we dive right into corgi's syntax, let's talk about where to put all your files.
Conventionally, corgi files live right in the package that they are used in. Do note, however, that this pattern isn't a fit-for-all and depending on your situation you may want to place your templates elsewhere. See this as guidance if you're unsure where to put your templates.
To generate functions from your templates, place a go:generate
directive somewhere in the package that executes the corgi
command on the template file.
You can install corgi with go install
:
Last updated