Unexport NewResponseWriter
This commit is contained in:
parent
9eae88f00c
commit
310bd16344
@ -130,8 +130,7 @@ type ResponseWriter struct {
|
||||
conn net.Conn
|
||||
}
|
||||
|
||||
// NewResponseWriter returns a ResponseWriter that uses the provided io.WriteCloser.
|
||||
func NewResponseWriter(w io.WriteCloser) *ResponseWriter {
|
||||
func newResponseWriter(w io.WriteCloser) *ResponseWriter {
|
||||
return &ResponseWriter{
|
||||
bw: bufio.NewWriter(w),
|
||||
cl: w,
|
||||
|
@ -109,7 +109,7 @@ func TestReadWriteResponse(t *testing.T) {
|
||||
}
|
||||
|
||||
var b strings.Builder
|
||||
w := NewResponseWriter(nopCloser{&b})
|
||||
w := newResponseWriter(nopCloser{&b})
|
||||
w.WriteHeader(test.Status, test.Meta)
|
||||
io.Copy(w, strings.NewReader(test.Body))
|
||||
if err := w.Flush(); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user