mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 20:22:20 +08:00
20 lines
266 B
Go
20 lines
266 B
Go
package gin
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type ResponseWriter struct {
|
|
http.ResponseWriter
|
|
status int
|
|
}
|
|
|
|
func (w *ResponseWriter) WriteHeader(code int) {
|
|
w.status = code
|
|
w.ResponseWriter.WriteHeader(code)
|
|
}
|
|
|
|
func (w *ResponseWriter) Status() int {
|
|
return w.status
|
|
}
|