MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / start

Method start

testutil/test_server.go:111–122  ·  view source on GitHub ↗

start starts the server

()

Source from the content-addressed store, hash-verified

109
110// start starts the server
111func (s *TestServer) start() *TestServer {
112 s.testServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
113 httpheaders.CopyAll(s.header, w.Header(), true)
114 if s.hook != nil {
115 s.hook(r, w)
116 }
117 w.WriteHeader(s.status)
118 w.Write(s.data)
119 }))
120
121 return s
122}

Callers 1

NewTestServerFunction · 0.95

Calls 3

CopyAllFunction · 0.92
WriteHeaderMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected