Documentation ¶
Overview ¶
Package helpers contains functions that can be used in templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
func HTML(v interface{}) template.SafeString
HTML converts v to a string, escapes any special characters for HTML-safe output, and returns it as a safe string.
func Has ¶
Has returns whether the scope s stores a value identified by name. The s argument is usually filled using an evaluator.ResolveArgumentFunc.
func Len ¶
func Len(v interface{}) int
Len returns the length of v. If v is a string, slice, or array, it returns len(v). Len panics if v is neither of those types, or if v is nil.
func Safe ¶
func Safe(v interface{}) template.SafeString
Safe converts v to a string and returns it as a safe string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.