MCPcopy Create free account
hub / github.com/php/frankenphp / Write

Method Write

recorder_test.go:113–119  ·  view source on GitHub ↗

Write implements http.ResponseWriter. The data in buf is written to rw.Body, if not nil.

(buf []byte)

Source from the content-addressed store, hash-verified

111// Write implements http.ResponseWriter. The data in buf is written to
112// rw.Body, if not nil.
113func (rw *ResponseRecorder) Write(buf []byte) (int, error) {
114 rw.writeHeader(buf, "")
115 if rw.Body != nil {
116 rw.Body.Write(buf)
117 }
118 return len(buf), nil
119}
120
121// WriteString implements io.StringWriter. The data in str is written
122// to rw.Body, if not nil.

Callers

nothing calls this directly

Calls 1

writeHeaderMethod · 0.95

Tested by

no test coverage detected