Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var T = whtmpl.NewCollection().Funcs(template.FuncMap{ "linkify": func(val string) (template.HTML, error) { tmpl := `{{.}}` if strings.HasPrefix(strings.ToLower(val), "http") { tmpl = `<a href="{{.}}">{{.}}</a>` } t, err := template.New("").Parse(tmpl) if err != nil { return "", err } var buf bytes.Buffer err = t.Execute(&buf, val) if err != nil { return "", err } return template.HTML(buf.String()), nil }})
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.