-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathhandlers.go
More file actions
31 lines (27 loc) · 812 Bytes
/
handlers.go
File metadata and controls
31 lines (27 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main
import (
"fmt"
"log"
"net/http"
)
func indexHandler(w http.ResponseWriter, r *http.Request) {
log.Output(1, "INDEX Handler")
err := templates.ExecuteTemplate(w, "index.html", nil)
if err != nil {
log.Output(1, fmt.Sprintf("Template execution failed: %s", err))
}
}
func volunteerHandler(w http.ResponseWriter, r *http.Request) {
log.Output(1, "VOLUNTEER Handler")
err := templates.ExecuteTemplate(w, "volunteer.html", nil)
if err != nil {
log.Output(1, fmt.Sprintf("Template execution failed: %s", err))
}
}
func faqsHandler(w http.ResponseWriter, r *http.Request) {
log.Output(1, "FAQS Handler")
err := templates.ExecuteTemplate(w, "volunteer.html", nil)
if err != nil {
log.Output(1, fmt.Sprintf("Template execution failed: %s", err))
}
}