Templating engine supports calling functions like {{ len .Tweet }}
where len
is a function that returns length of an array or slice.
and
, or
, not
are for logical operations:
https://codeeval.dev/gist/4f9259953079361d8669061bf128ed6e
index
is for accessing elements of a slice by index or values in a map by key.
https://codeeval.dev/gist/dc5f47467b77c7c8584bd2461ba080fe
len
returns length of an array of map.
https://codeeval.dev/gist/904b8bed0754de3c10f494930a4a3a83
print
is like fmt.Sprint
.
printf
is like fmt.Sprintf
.
println
is like fmt.Sprintln
.
https://codeeval.dev/gist/e543f880ba15c189c2e2001c4323ca94
js
, html
and urlquery
is for escaping text so that it can be safely inserted in a JavaScript, HTML and URL context: