methodHandler writes the method string in response.
(method string)
| 2183 | |
| 2184 | // methodHandler writes the method string in response. |
| 2185 | func methodHandler(method string) http.HandlerFunc { |
| 2186 | return func(w http.ResponseWriter, r *http.Request) { |
| 2187 | _, err := w.Write([]byte(method)) |
| 2188 | if err != nil { |
| 2189 | log.Printf("Failed writing HTTP response: %v", err) |
| 2190 | } |
| 2191 | } |
| 2192 | } |
| 2193 | |
| 2194 | // TestMethodsSubrouterCatchall matches handlers for subrouters where a |
| 2195 | // catchall handler is set for a mis-matching method. |
no test coverage detected