14 lines
224 B
Go
14 lines
224 B
Go
|
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)
|
||
|
}
|