ResponseWriter is the basic response writer, it writes directly to the underline http.ResponseWriter
| 142 | // ResponseWriter is the basic response writer, |
| 143 | // it writes directly to the underline http.ResponseWriter |
| 144 | type responseWriter struct { |
| 145 | http.ResponseWriter |
| 146 | |
| 147 | statusCode int // the saved status code which will be used from the cache service |
| 148 | // statusCodeSent bool // reply header has been (logically) written | no needed any more as we have a variable to catch total len of written bytes |
| 149 | written int // the total size of bytes were written |
| 150 | // yes only one callback, we need simplicity here because on FireStatusCode the beforeFlush events should NOT be cleared |
| 151 | // but the response is cleared. |
| 152 | // Sometimes is useful to keep the event, |
| 153 | // so we keep one func only and let the user decide when he/she wants to override it with an empty func before the FireStatusCode (context's behavior) |
| 154 | beforeFlush func() |
| 155 | } |
| 156 | |
| 157 | var _ ResponseWriter = (*responseWriter)(nil) |
| 158 |
nothing calls this directly
no outgoing calls
no test coverage detected