-
Notifications
You must be signed in to change notification settings - Fork 9
Home
suntong edited this page Dec 31, 2021
·
10 revisions
Welcome to the easygen wiki!
Template examples listed in Getting Started
-
list0.tmpl
First example
check result: list1.ref -
list1.tmpl
to use quotes in the driving data
check result: list1.ref -
list1HTML.tmpl
to output above quotes in the driving data in html format
check result: list1HTML.ref -
listfunc1.tmpl
to eliminate the last comma ",
" before the end
check result: listfunc1.ref -
list0E.tmpl
to use environment variables in template
check result: list0E.ref
Also, Golang Templates Cheatsheet(now mirrored here) could be helpful when composing your template.
- Testing the templates on the fly
- How to include nested templates from other files
- See also Template Actions and Nested Templates in Go on the internet
- Easygen usage
- Command line flag handling code auto generation
- Easygen is not only for cli but it's a Universal code/text generator
- Different easygen (API) Versions
Check the TOC on the right for the rest 👉 👉