iotest

package
v0.58.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorWriter

func NewErrorWriter(err error) io.Writer

NewErrorWriter returns io.Writer always returning (0, err). The err should not be nil.

func NewErrorWriterN

func NewErrorWriterN(w io.Writer, err error, n uint32) io.Writer

NewErrorWriterN returns io.Writer returning (0, err) after n calls to w.

Types

type SliceWriterTo

type SliceWriterTo []byte

SliceWriterTo is an io.WriterTo writing byte slice into provided io.Writer once.

SliceWriterTo is useful for multiple io.WriterTo.WriteTo calls. For single call, it is recommended to use bytes.Reader or bytes.Buffer instead.

func (SliceWriterTo) WriteTo

func (x SliceWriterTo) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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