Module gtmpl::funcs [] [src]

Builtin functions.

Structs

BUILTINS

Map of all builtin function.

Functions

and

Returns the boolean AND of its arguments by returning the first empty argument or the last argument, that is, "and x y" behaves as "if x then y else x". All the arguments are evaluated.

eq

Returns the boolean truth of arg1 == arg2 [== arg3 ...]

ge

Returns the boolean truth of arg1 >= arg2

gt

Returns the boolean truth of arg1 > arg2

index

Returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each indexed item must be a map, slice or array.

le

Returns the boolean truth of arg1 <= arg2

len

Returns the integer length of its argument.

lt

Returns the boolean truth of arg1 < arg2

ne

Returns the boolean truth of arg1 != arg2

not

Returns the boolean negation of its single argument.

or

Returns the boolean OR of its arguments by returning the first non-empty argument or the last argument, that is, "or x y" behaves as "if x then x else y". All the arguments are evaluated.

print

An implementation of golang's fmt.Sprint

println

An implementation of golang's fmt.Sprintln

urlquery

Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.