Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTemplate ¶
func RenderTemplate( w http.ResponseWriter, page string, td *TemplateData, ) (err error)
* * renderTemplate renders the template *
Types ¶
type ManifestEntry ¶
type TemplateData ¶
type TemplateData struct { Version string ProductTitle string Title string Flashes []sessions.SessionFlash User models.User Data any CSRFToken string CSRFName string CurrentYear int PreviousPage string }
func NewTemplateData ¶
func NewTemplateData(conf *config.Config, session *sessions.SessionManager, r *http.Request) *TemplateData
views.NewTemplateData returns the default template parameters for a user and the CSRF token.
Click to show internal directories.
Click to hide internal directories.