As you may have guess from the previous example:
<% %>
blocks, and
<%= %>
, and
<%@import foo.bar.Baz %>
causes foo.bar.Baz
to be imported, and
<%@params foo, bar, baz %>
causes the template function to have 3 parameters, i.e., it is a
|foo, bar, baz| { ... }
function.
When no <%@params ... %>
exists, the function is assumed to have a single params
parameter.
The template engine is a simple one and makes no verification either on the templates
or the resulting Golo source code. The compile
method may throw a GoloCompilation
exception
though, and you can query the exception getSourceCode()
and getProblems()
methods to obtain
more details.