adb90d657c
* Bundle fields used in most template variables under CommonTemplateVariables * Make handlers use CommonTemplateVariables
13 lignes
291 o
Go
13 lignes
291 o
Go
package router
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func FaqHandler(w http.ResponseWriter, r *http.Request) {
|
|
ftv := FaqTemplateVariables{NewCommonVariables(r)}
|
|
err := faqTemplate.ExecuteTemplate(w, "index.html", ftv)
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
}
|
|
}
|