aghio

package
v0.107.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package aghio contains extensions for io package's types and methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitReader added in v0.107.0

func LimitReader(r io.Reader, n int64) (limited io.Reader, err error)

LimitReader wraps Reader to make it's Reader stop with ErrLimitReached after n bytes read.

Types

type LimitReachedError

type LimitReachedError struct {
	Limit int64
}

LimitReachedError records the limit and the operation that caused it.

func (*LimitReachedError) Error

func (lre *LimitReachedError) Error() string

Error implements the error interface for LimitReachedError.

TODO(a.garipov): Think about error string format.

Jump to

Keyboard shortcuts

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