xio

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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