rename ngin to rest

This commit is contained in:
kevin
2020-07-31 11:14:48 +08:00
parent e133ffd820
commit 0897f60c5d
78 changed files with 118 additions and 111 deletions

View File

@@ -0,0 +1,21 @@
package security
import "net/http"
type WithCodeResponseWriter struct {
Writer http.ResponseWriter
Code int
}
func (w *WithCodeResponseWriter) Header() http.Header {
return w.Writer.Header()
}
func (w *WithCodeResponseWriter) Write(bytes []byte) (int, error) {
return w.Writer.Write(bytes)
}
func (w *WithCodeResponseWriter) WriteHeader(code int) {
w.Writer.WriteHeader(code)
w.Code = code
}