Files
goreportcard/handlers/about.go
Herman Schaaf 8c45357cd9 Use [[ ]] delims across all templates,
correct the google analytics variable for several templates
make about page dynamic to allow for custom google analytics code
2016-03-17 00:26:01 +08:00

19 lines
401 B
Go

package handlers
import (
"log"
"net/http"
"text/template"
)
// AboutHandler handles the about page
func AboutHandler(w http.ResponseWriter, r *http.Request) {
log.Println("Serving about page")
t := template.Must(template.New("about.html").Delims("[[", "]]").ParseFiles("templates/about.html"))
t.Execute(w, map[string]interface{}{
"google_analytics_key": googleAnalyticsKey,
})
return
}