18 lines
352 B
Go
18 lines
352 B
Go
|
package handler
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
// Index is the handler that displays the index page.
|
||
|
func Index(w http.ResponseWriter, r *http.Request) {
|
||
|
CurrentTheme.ExecuteTemplate(w, "index.tmpl", nil)
|
||
|
}
|
||
|
|
||
|
// Handler is the mux-ing handler.
|
||
|
func Handler(w http.ResponseWriter, r *http.Request) {
|
||
|
if r.URL.Path == "/" {
|
||
|
Index(w, r)
|
||
|
return
|
||
|
}
|
||
|
Post(w, r)
|
||
|
}
|