I'm thinking about creating syntax highlighter for it, but I don't know the conventional abbreviation for this specific type of template.
Here List should be an array, map or slice which if has length 0, then template temp_1 will be executed, else it iterates through the elements on List. The input format for a template should be of a UTF-8-encoded format. Any other text outside is printed as it is to the standard output. The predefined variable os.
In one of the examples from the text/template godoc, they refer to ".tmpl" files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With