v/examples/templates
yuyi 108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562)
2021-09-21 16:20:09 +03:00
..
data.json
readme.md
template.md
templates.v fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +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.