ioerr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EOFIsUnexpected

func EOFIsUnexpected(args ...interface{}) error

EOFIsUnexpected converts io.EOF errors into io.ErrUnexpected, which is useful when using binary.Read to decode aprts of a structure that aren't at the start and when a io.EOF error is not expected.

It can be called in one of 2 ways - either with a single argument which must be an error, or with a format string and an arbitrary number of arguments. In this second mode, the function is a wrapper around xerrors.Errorf.

This only works on raw io.EOF errors - ie, it won't work on errors that have been wrapped.

func PassRawEOF

func PassRawEOF(format string, args ...interface{}) error

PassRawEOF is a wrapper around xerrors.Errorf that will return a raw io.EOF if this is the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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