split up admin / sub handler

This commit is contained in:
sentriz
2019-04-25 15:54:47 +01:00
parent 3bf8ac8a43
commit 8e480e104d
13 changed files with 280 additions and 239 deletions

View File

@@ -0,0 +1,13 @@
package handler
import (
"log"
"net/http"
)
func (c *Controller) WithLogging(next http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
log.Printf("connection from `%s` for `%s`", r.RemoteAddr, r.URL)
next.ServeHTTP(w, r)
}
}