MCPcopy Index your code
hub / github.com/github/copilot-sdk / drainBody

Function drainBody

go/copilot_request_handler.go:210–216  ·  view source on GitHub ↗
(ch <-chan CopilotWebSocketMessage)

Source from the content-addressed store, hash-verified

208}
209
210func drainBody(ch <-chan CopilotWebSocketMessage) []byte {
211 var buf bytes.Buffer
212 for frame := range ch {
213 buf.Write(frame.Data)
214 }
215 return buf.Bytes()
216}
217
218func streamResponseToSink(resp *http.Response, sink *responseSink) error {
219 if err := sink.start(resp.StatusCode, statusText(resp), cloneHeader(resp.Header)); err != nil {

Callers 1

buildHTTPRequestFunction · 0.70

Calls 2

BytesMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…