Documentation ¶
Overview ¶
Package xio provides functions and utilities that extends the standard library with additional functionality.
Index ¶
Constants ¶
View Source
const ( // ErrNilReader is returned when a nil reader is passed to // ReaderToReadSeeker. ErrNilReader xerrors.Error = "provided reader is nil" // ErrCopy is returned when an error occurs during the copying of data from // the reader. ErrCopy xerrors.Error = "failed to buffer reader's content" )
Variables ¶
This section is empty.
Functions ¶
func ReaderToReadSeeker ¶ added in v0.6.0
func ReaderToReadSeeker(r io.Reader) (io.ReadSeeker, error)
ReaderToReadSeeker checks if the provided io.Reader also implements io.ReadSeeker. If it does not, it reads the reader's content into memory and returns a bytes.Reader that implements io.ReadSeeker.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.