Documentation ¶
Index ¶
- func AddDefaultData(td *models.TemplateData, r *http.Request) *models.TemplateData
- func CreateTemplateCache() (map[string]*template.Template, error)
- func NewTemplate(a *config.AppConfig)
- func RenderTemplate(w http.ResponseWriter, r *http.Request, tmpl string, td *models.TemplateData) error
- func TestAddDefaultData(t *testing.T)
- func TestCreateTemplateCache(t *testing.T)
- func TestMain(m *testing.M)
- func TestNewTemplate(t *testing.T)
- func TestRenderTemplate(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultData ¶
func AddDefaultData(td *models.TemplateData, r *http.Request) *models.TemplateData
Returns data that should be available to all functions
func NewTemplate ¶
func RenderTemplate ¶
func RenderTemplate(w http.ResponseWriter, r *http.Request, tmpl string, td *models.TemplateData) error
Renders the template with name templ
func TestAddDefaultData ¶
func TestCreateTemplateCache ¶
func TestNewTemplate ¶
func TestRenderTemplate ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.