aboutsummaryrefslogtreecommitdiff
path: root/del.go
diff options
context:
space:
mode:
Diffstat (limited to 'del.go')
-rw-r--r--del.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/del.go b/del.go
deleted file mode 100644
index a106129..0000000
--- a/del.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package main
-
-import "net/http"
-
-func init() {
- http.HandleFunc("/del/", delHandler)
-}
-
-func delHandler(w http.ResponseWriter, r *http.Request) {
- title := r.URL.Path[len("/del/"):]
- p := &Page{Title: title}
- if err := p.del(); err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
- http.Redirect(w, r, "/", http.StatusFound)
-}