MCPcopy
hub / github.com/go-git/go-git / NewContextWriter

Function NewContextWriter

utils/ioutil/common.go:137–139  ·  view source on GitHub ↗

NewContextWriter wraps a writer to make it respect given Context. If there is a blocking write, the returned Writer will return whenever the context is cancelled (the return values are n=0 and err=ctx.Err()).

(ctx context.Context, w io.Writer)

Source from the content-addressed store, hash-verified

135// If there is a blocking write, the returned Writer will return whenever the
136// context is cancelled (the return values are n=0 and err=ctx.Err()).
137func NewContextWriter(ctx context.Context, w io.Writer) io.Writer {
138 return ctxio.NewWriter(ctx, w)
139}
140
141// NewContextReader wraps a reader to make it respect given Context.
142// If there is a blocking read, the returned Reader will return whenever the

Callers 1

TestNewContextWriterMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestNewContextWriterMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…