MCPcopy Create free account
hub / github.com/imroc/req / closeWithErrorAndCode

Method closeWithErrorAndCode

internal/http2/pipe.go:120–120  ·  view source on GitHub ↗

closeWithErrorAndCode is like CloseWithError but also sets some code to run in the caller's goroutine before returning the error.

(err error, fn func())

Source from the content-addressed store, hash-verified

118// closeWithErrorAndCode is like CloseWithError but also sets some code to run
119// in the caller's goroutine before returning the error.
120func (p *pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) }
121
122func (p *pipe) closeWithError(dst *error, err error, fn func()) {
123 if err == nil {

Callers 1

endStreamMethod · 0.80

Calls 1

closeWithErrorMethod · 0.95

Tested by

no test coverage detected