MCPcopy
hub / github.com/gorilla/mux / ServeHTTP

Method ServeHTTP

mux_test.go:2791–2794  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

2789}
2790
2791func (h customMethodNotAllowedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
2792 w.WriteHeader(http.StatusMethodNotAllowed)
2793 fmt.Fprint(w, h.msg)
2794}
2795
2796func TestSubrouterCustomMethodNotAllowed(t *testing.T) {
2797 handler := func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) }

Callers 3

TestSubrouterHeaderFunction · 0.45
testMethodsSubrouterFunction · 0.45
TestContextMiddlewareFunction · 0.45

Calls 1

WriteHeaderMethod · 0.45

Tested by

no test coverage detected