Use template for faq page
This commit is contained in:
parent
8051f053c3
commit
b3dbd23a8e
11
main.go
11
main.go
@ -34,15 +34,8 @@ func contactHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
executeTemplate(w, path)
|
executeTemplate(w, path)
|
||||||
}
|
}
|
||||||
func faqHandler(w http.ResponseWriter, r *http.Request) {
|
func faqHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "text/html; charset=utf8")
|
path := "templates/faq.gohtml"
|
||||||
fmt.Fprint(w, `
|
executeTemplate(w, path)
|
||||||
<h1>FAQ</h1>
|
|
||||||
<hr>
|
|
||||||
<h3>Is this a real website?</h3>
|
|
||||||
<p>No.</p>
|
|
||||||
<h3>I Can Has Cheezburger?</h3>
|
|
||||||
<p>No.</p>
|
|
||||||
`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user