MCPcopy Create free account
hub / github.com/devfeel/dotweb / initResponseContext

Function initResponseContext

utils_test.go:41–57  ·  view source on GitHub ↗

init response context

(param *InitContextParam)

Source from the content-addressed store, hash-verified

39
40// init response context
41func initResponseContext(param *InitContextParam) *HttpContext {
42 context := &HttpContext{
43 response: &Response{},
44 }
45
46 var buf1 bytes.Buffer
47 w := io.MultiWriter(&buf1)
48
49 writer := &gzipResponseWriter{
50 ResponseWriter: &httpWriter{},
51 Writer: w,
52 }
53
54 context.response = NewResponse(writer)
55
56 return context
57}
58
59// init request and response context
60func initAllContext(param *InitContextParam) *HttpContext {

Callers 4

TestWriteFunction · 0.85
TestWriteStringFunction · 0.85
TestWriteJsonFunction · 0.85
TestWriteJsonpFunction · 0.85

Calls 1

NewResponseFunction · 0.85

Tested by

no test coverage detected