IsGet reports whether r.Method is a GET or HEAD request.
(r *http.Request)
| 35 | |
| 36 | // IsGet reports whether r.Method is a GET or HEAD request. |
| 37 | func IsGet(r *http.Request) bool { |
| 38 | return r.Method == "GET" || r.Method == "HEAD" |
| 39 | } |
| 40 | |
| 41 | func ErrorRouting(rw http.ResponseWriter, req *http.Request) { |
| 42 | http.Error(rw, "Handlers wired up wrong; this path shouldn't be hit", 500) |
no outgoing calls
no test coverage detected