Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Assets = union.New(map[string]http.FileSystem{ "/templates": filter.Keep( http.Dir("../template"), func(path string, fi os.FileInfo) bool { return path == "/" || path == "/default.tmpl" }, ), })
Assets contains the project's assets.
View Source
var DefaultFuncs = FuncMap{ "toUpper": strings.ToUpper, "toLower": strings.ToLower, "title": strings.Title, "join": func(sep string, s []string) string { return strings.Join(s, sep) }, "match": regexp.MatchString, "safeHtml": func(text string) tmplhtml.HTML { return tmplhtml.HTML(text) }, "reReplaceAll": func(pattern, repl, text string) string { re := regexp.MustCompile(pattern) return re.ReplaceAllString(text, repl) }, "stringSlice": func(s ...string) []string { return s }, "markdown": markdownEscapeString, }
Functions ¶
This section is empty.
Types ¶
type Template ¶
Template bundles a text and a html template instance.
func (*Template) ExecuteHTMLString ¶
ExecuteHTMLString needs a meaningful doc comment (TODO(fabxc)).
Click to show internal directories.
Click to hide internal directories.