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 ¶
PassRawEOF is a wrapper around xerrors.Errorf that will return a raw io.EOF if this is the error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.