(code int)
| 168 | } |
| 169 | |
| 170 | func (c *capturingWriter) WriteHeader(code int) { |
| 171 | if c.statusCode == 0 { |
| 172 | c.statusCode = code |
| 173 | } |
| 174 | c.ResponseWriter.WriteHeader(code) |
| 175 | } |
| 176 | |
| 177 | func (c *capturingWriter) Write(b []byte) (int, error) { |
| 178 | if c.statusCode == 0 { |
no outgoing calls