examples

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 4 Imported by: ? 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

Overview

Package examples demonstrates how copies report data, readiness, and multi-shot completions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyWithErrMore

func CopyWithErrMore() (
	firstN int64, firstErr error,
	secondN int64, secondErr error,
	thirdN int64, thirdErr error,
	out string,
)

CopyWithErrMore reads three queued chunks through a one-byte copy buffer. The first two copies each return two bytes and iox.ErrMore. The third reaches the end of the input.

func CopyWithPolicy added in v0.2.0

func CopyWithPolicy() (n int64, err error, out string)

CopyWithPolicy uses iox.YieldPolicy to wait for readiness and retry iox.ErrWouldBlock within a single copy.

func CopyWithWouldBlock

func CopyWithWouldBlock() (firstN int64, firstErr error, secondN int64, secondErr error, out string)

CopyWithWouldBlock receives a readiness notification after the first copy returns (0, iox.ErrWouldBlock). The second copy transfers "ok".

Types

This section is empty.

Jump to

Keyboard shortcuts

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