MCPcopy
hub / github.com/gin-gonic/gin / ServeHTTP

Method ServeHTTP

utils_test.go:33–38  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

31}
32
33func (t *testStruct) ServeHTTP(w http.ResponseWriter, req *http.Request) {
34 assert.Equal(t.T, http.MethodPost, req.Method)
35 assert.Equal(t.T, "/path", req.URL.Path)
36 w.WriteHeader(http.StatusInternalServerError)
37 fmt.Fprint(w, "hello")
38}
39
40func TestWrap(t *testing.T) {
41 router := New()

Callers

nothing calls this directly

Calls 1

WriteHeaderMethod · 0.45

Tested by

no test coverage detected