MCPcopy
hub / github.com/git-lfs/git-lfs / readResponse

Method readResponse

tq/custom.go:191–200  ·  view source on GitHub ↗
(ctx *customAdapterWorkerContext)

Source from the content-addressed store, hash-verified

189}
190
191func (a *customAdapter) readResponse(ctx *customAdapterWorkerContext) (*customAdapterResponseMessage, error) {
192 line, err := ctx.bufferedOut.ReadString('\n')
193 if err != nil {
194 return nil, err
195 }
196 a.Trace("xfer: Custom adapter worker %d received response: %v", ctx.workerNum, strings.TrimSpace(line))
197 resp := &customAdapterResponseMessage{}
198 err = json.Unmarshal([]byte(line), resp)
199 return resp, err
200}
201
202// exchangeMessage sends a message to a process and reads a response if resp != nil
203// Only fatal errors to communicate return an error, errors may be embedded in reply

Callers 2

exchangeMessageMethod · 0.95
DoTransferMethod · 0.95

Calls 1

TraceMethod · 0.45

Tested by

no test coverage detected