Documentation ¶ Overview ¶ Package ctxio provides context-aware io.ReadCloser and io.WriteCloser implementations that handle cancellations during blocking read/write operations. Index ¶ func NewReader(ctx context.Context, r io.Reader) io.ReadCloser Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewReader ¶ func NewReader(ctx context.Context, r io.Reader) io.ReadCloser NewReader returns a context-aware io.ReadCloser that reads from the given reader r. Cancellation works even if the reader is blocked on read. Closing the returned io.ReadCloser will not close the underlying reader. Types ¶ This section is empty. Source Files ¶ View all Source files ctxio.go Click to show internal directories. Click to hide internal directories.