This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
blgo/handler/handler.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)
}