(next http.Handler)
| 29 | var transact *TransactionLogger |
| 30 | |
| 31 | func loggingMiddleware(next http.Handler) http.Handler { |
| 32 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 33 | log.Println(r.Method, r.RequestURI) |
| 34 | next.ServeHTTP(w, r) |
| 35 | }) |
| 36 | } |
| 37 | |
| 38 | func notAllowedHandler(w http.ResponseWriter, r *http.Request) { |
| 39 | http.Error(w, "Not Allowed", http.StatusMethodNotAllowed) |
nothing calls this directly
no outgoing calls
no test coverage detected