add supprt for go1.20 http.rwUnwrapper to gin.responseWriter (#3489)

This commit is contained in:
David Desmarais-Michaud
2023-02-12 00:01:43 -05:00
committed by GitHub
parent bd82c9e351
commit c1d06e3d08
2 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,10 @@ type responseWriter struct {
var _ ResponseWriter = (*responseWriter)(nil)
func (w *responseWriter) Unwrap() http.ResponseWriter {
return w.ResponseWriter
}
func (w *responseWriter) reset(writer http.ResponseWriter) {
w.ResponseWriter = writer
w.size = noWritten