MCPcopy Index your code
hub / github.com/ContentSquare/chproxy / Write

Method Write

io.go:99–111  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

97}
98
99func (rw *statResponseWriter) Write(b []byte) (int, error) {
100 if rw.statusCode == 0 {
101 rw.statusCode = http.StatusOK
102 }
103 if !rw.wroteHeader {
104 rw.ResponseWriter.WriteHeader(rw.statusCode)
105 rw.wroteHeader = true
106 }
107 n, err := rw.ResponseWriter.Write(b)
108 rw.bytesWritten.Add(float64(n))
109
110 return n, err
111}
112
113func (rw *statResponseWriter) WriteHeader(statusCode int) {
114 // cache statusCode to keep the opportunity to change it in further

Callers 9

TestGetFullQueryGzippedFunction · 0.45
hashFunction · 0.45
getFullQueryFunction · 0.45
calcMapHashFunction · 0.45
calcCredentialHashFunction · 0.45
TestServeFunction · 0.45
fakeCHHandlerFunction · 0.45

Calls 1

WriteHeaderMethod · 0.45

Tested by 5

TestGetFullQueryGzippedFunction · 0.36
TestServeFunction · 0.36
fakeCHHandlerFunction · 0.36