WriteHeader may not be explicitly called, so care must be taken to initialize w.code to its default value of http.StatusOK.
(code int)
| 228 | // WriteHeader may not be explicitly called, so care must be taken to |
| 229 | // initialize w.code to its default value of http.StatusOK. |
| 230 | func (w *interceptingWriter) WriteHeader(code int) { |
| 231 | w.code = code |
| 232 | w.ResponseWriter.WriteHeader(code) |
| 233 | } |
no outgoing calls