package main import "net/http" type wrappedResponseWriter struct { http.ResponseWriter statusCode int } func (w *wrappedResponseWriter) WriteHeader(code int) { w.statusCode = code w.ResponseWriter.WriteHeader(code) }