summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.go b/main.go
index 36781f2..9ec7157 100644
--- a/main.go
+++ b/main.go
@@ -11,11 +11,20 @@ import (
)
func accessLog(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ t := &TemplateHandler{handler: h}
+ //t := &TemplateHandler{}
+ fn := func(w http.ResponseWriter, r *http.Request) {
log.Println(r.Method, r.URL.Path, r.RemoteAddr)
- h.ServeHTTP(w, r)
- })
+ t.ServeHTTP(w, r)
+ }
+ return http.HandlerFunc(fn)
+}
+
+/*
+func TemplateHandler(h http.Handler) http.Handler {
+ h.handler
}
+*/
func uploadHandler(dir string) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {