v/examples/templates
Delyan Angelov ead445e205
examples: cleanup generated file examples/templates/result.md
2021-06-12 17:08:14 +03:00
..
data.json examples: add a template example, update the regex examples (#8829) 2021-02-19 12:39:15 +02:00
readme.md examples: add a template example, update the regex examples (#8829) 2021-02-19 12:39:15 +02:00
template.md examples: add a template example, update the regex examples (#8829) 2021-02-19 12:39:15 +02:00
templates.v tools: format most examples and tutorials, add them to `v test-cleancode` (#9826) 2021-04-20 17:16:35 +03:00

readme.md

example how to work with templates

  • templates support
    • if
    • for loops
    • even nesting of for loops
    • syntax checking
    • embed the template into the binary

Its a very cool way how to do also do e.g. system administration, fill in config files, etc...

The example there is also a good demonstration of how to use json on a more complex object and read/write to file.