quicktemplate
quicktemplate copied to clipboard
Function type which is called once at compile time
Is there anyway we can create a type that function which will be called once at compile time instead of being called every time at runtime? Thanks for creating such amazing package.
You may use two-step go:generate for generating template output from *.qtpl files before compile time:
- Generate
*.qtpl.gofiles at first step with qtc. - Generate output file from the generated
*.qtpl.gofiles withgo run.