Remove roothandler

This commit is contained in:
Eliot Whalan 2016-06-23 11:02:59 +10:00
parent 387d5f313b
commit be553d6609
1 changed files with 0 additions and 4 deletions

View File

@ -174,9 +174,6 @@ func saveHandler(w http.ResponseWriter, r *http.Request) {
} }
func rootHandler(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, TEXT)
}
func langHandler(w http.ResponseWriter, r *http.Request) { func langHandler(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r) vars := mux.Vars(r)
@ -217,7 +214,6 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
func main() { func main() {
router := mux.NewRouter().StrictSlash(true) router := mux.NewRouter().StrictSlash(true)
router.HandleFunc("/", rootHandler)
router.HandleFunc("/p/{pasteId}", pasteHandler) router.HandleFunc("/p/{pasteId}", pasteHandler)
router.HandleFunc("/p/{pasteId}/{lang}", langHandler) router.HandleFunc("/p/{pasteId}/{lang}", langHandler)
router.HandleFunc("/save", saveHandler) router.HandleFunc("/save", saveHandler)