init response context
(param *InitContextParam)
| 39 | |
| 40 | // init response context |
| 41 | func 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 |
| 60 | func initAllContext(param *InitContextParam) *HttpContext { |
no test coverage detected