ioutil

package
v0.6.24 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReaderWithContext

func NewReaderWithContext(ctx context.Context, r ReaderClosure) io.Reader

NewReaderWithContext returns a new 'io.Reader' implementation which cancels reading once the provided 'context.Context' is closed.

Types

type ReaderClosure

type ReaderClosure func([]byte) (int, error)

ReaderClosure wraps a function which implements 'io.Reader', allowing for inline 'io.Reader' definitions.

func (ReaderClosure) Read

func (r ReaderClosure) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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