ioutils

package
v28.5.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyCtx

func CopyCtx(ctx context.Context, dst io.Writer, src io.Reader) (n int64, err error)

CopyCtx copies from src to dst until either EOF is reached on src or a context is cancelled. The writer is not closed when the context is cancelled.

After CopyCtx exits due to context cancellation, the goroutine that performed the copy may still be running if either the reader or writer blocks.

func NewCtxReader

func NewCtxReader(ctx context.Context, r io.Reader) io.Reader

NewCtxReader wraps the given reader with a reader that doesn't proceed with reading if the context is done.

Note: Read will still block if the underlying reader blocks.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL