Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RenderFunc ¶
var ( RenderNone RenderFunc = func(str string, params map[string]string) (string, error) { return str, nil } RenderPlain RenderFunc = func(str string, params map[string]string) (string, error) { tpl, err := texttpl.New("plain_email").Parse(str) if err != nil { return "", err } render := bytes.NewBuffer(make([]byte, 0, len(str))) if err = tpl.Execute(render, params); err != nil { return "", err } return render.String(), nil } RenderHTML RenderFunc = func(str string, params map[string]string) (string, error) { tpl, err := htmltpl.New("html_email").Parse(str) if err != nil { return "", err } render := bytes.NewBuffer(make([]byte, 0, len(str))) if err = tpl.Execute(render, params); err != nil { return "", err } return render.String(), nil } )
Click to show internal directories.
Click to hide internal directories.