package handlers import "net/http" // About renders the About page. func (a *App) About(w http.ResponseWriter, r *http.Request) { a.render(w, r, "about", "About", nil, "") } // WhatIsThis renders the "what is this?" explainer page. func (a *App) WhatIsThis(w http.ResponseWriter, r *http.Request) { a.render(w, r, "what", "What is this?", nil, "") } // Contact renders the contact page. func (a *App) Contact(w http.ResponseWriter, r *http.Request) { a.render(w, r, "contact", "Contact", contactData{}, "") } // contactData passed to the contact page (form submission state). type contactData struct { Sent bool Error string }