Documentation
¶
Index ¶
Constants ¶
View Source
const ( RenderStatusShow = "success" RenderStatusHide = "failure" )
Variables ¶
View Source
var ( DefaultFunctions = map[string]interface{}{ "duration": toDuration, "datetime": toDatetime, "success": isSuccess, "failure": isFailure, "truncate": truncate, "urlencode": urlencode, "since": since, "uppercasefirst": uppercaseFirst, "uppercase": strings.ToUpper, "lowercase": strings.ToLower, "regexReplace": regexReplace, } )
Functions ¶
func RegisterSettings ¶
func RegisterSettings(funcSettings map[string]interface{})
RegisterSettings most of this can use template.RegisterSettings(DefaultFunctions)
func Render ¶
Render parses and executes a template, returning the results in string format. Trailing or leading spaces or new-lines are not getting truncated. It is able to read templates from remote paths, local files or directly from the string.
func RenderStatusSupport ¶ added in v1.3.0
func RenderStatusSupport() []string
func RenderTrim ¶
RenderTrim parses and executes a template, returning the results in string format. The result is trimmed to remove left and right padding and newlines that may be added unintentially in the template markup.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.