Module gtmpl::funcs [−][src]
Expand description
Builtin functions.
Statics
Functions
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.
Returns the result of calling the first argument, which must be a function, with the remaining arguments as parameters.
Returns the boolean truth of arg1 == arg2 [== arg3 …]
Returns the boolean truth of arg1 >= arg2
Returns the boolean truth of arg1 > arg2
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.
Returns the boolean truth of arg1 <= arg2
Returns the integer length of its argument.
Returns the boolean truth of arg1 < arg2
Returns the boolean truth of arg1 != arg2
Returns the boolean negation of its single argument.
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.
An implementation of golang’s fmt.Sprint
An implementation of golang’s fmt.Sprintf Limitations:
An implementation of golang’s fmt.Sprintln
Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.