aghio

package
v0.105.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 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 LimitReadCloser

func LimitReadCloser(rc io.ReadCloser, n int64) (limited io.ReadCloser, err error)

LimitReadCloser wraps ReadCloser 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 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