Exemple #1
0
func init() {
	sigil.Register(template.FuncMap{
		"seq":        Seq,
		"default":    Default,
		"join":       Join,
		"split":      Split,
		"capitalize": Capitalize,
		"lower":      Lower,
		"upper":      Upper,
		"replace":    Replace,
		"trim":       Trim,
		"file":       File,
		"json":       Json,
		"yaml":       Yaml,
		"pointer":    Pointer,
		"include":    Include,
		"indent":     Indent,
		"var":        Var,
		"match":      Match,
		"render":     Render,
		"exists":     Exists,
		"dir":        Dir,
		"dirs":       Dirs,
		"files":      Files,
		"uniq":       Uniq,
		"drop":       Drop,
		"append":     Append,
		"stdin":      Stdin,
	})
}
Exemple #2
0
func init() {
	sigil.Register(template.FuncMap{
		// templating
		"include": Include,
		"default": Default,
		"var":     Var,
		// strings
		"capitalize": Capitalize,
		"lower":      Lower,
		"upper":      Upper,
		"replace":    Replace,
		"trim":       Trim,
		"indent":     Indent,
		"match":      Match,
		"render":     Render,
		"stdin":      Stdin,
		"substr":     Substring,
		"base64enc":  Base64Encode,
		"base64dec":  Base64Decode,
		// filesystem
		"file":   File,
		"exists": Exists,
		"dir":    Dir,
		"dirs":   Dirs,
		"files":  Files,
		"text":   Text,
		// external
		"sh":      Shell,
		"httpget": HttpGet,
		// structured data
		"pointer": Pointer,
		"json":    Json,
		"tojson":  ToJson,
		"yaml":    Yaml,
		"toyaml":  ToYaml,
		"uniq":    Uniq,
		"drop":    Drop,
		"append":  Append,
		"seq":     Seq,
		"join":    Join,
		"joinkv":  JoinKv,
		"split":   Split,
		"splitkv": SplitKv,
	})
}