Documentation ¶
Index ¶
- func Add(a, b int) int
- func AddDefaultData(td *models.TemplateData, r *http.Request) *models.TemplateData
- func CreateTemplateCache() (map[string]*template.Template, error)
- func FormatDate(t time.Time, f string) string
- func HumanDate(t time.Time) string
- func Iterate(count int) []int
- func NewRenderer(a *config.AppConfig)
- func Template(w http.ResponseWriter, r *http.Request, tmpl string, td *models.TemplateData) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultData ¶
func AddDefaultData(td *models.TemplateData, r *http.Request) *models.TemplateData
AddDefaultData adds data for all templates
func CreateTemplateCache ¶
CreateTemplateCache creates a template cache as a map
func NewRenderer ¶
NewRenderer sets the config for the template package
func Template ¶
func Template(w http.ResponseWriter, r *http.Request, tmpl string, td *models.TemplateData) error
Template renders templates using html/template
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.