ioext

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LenReader

type LenReader interface {
	Len() int
}

LenReader is an interface implemented by many in-memory io.Reader's. Used for automatically sending the right Content-Length header when possible.

type ReaderFunc

type ReaderFunc func() (io.Reader, error)

type RepeatableReader

type RepeatableReader struct {
	// contains filtered or unexported fields
}

可重复读取的 Reader, 可用于 http 中再次发送请求等.

func NewRepeatableReader

func NewRepeatableReader(reader io.Reader) *RepeatableReader

func (*RepeatableReader) Close

func (rr *RepeatableReader) Close() error

func (*RepeatableReader) Read

func (rr *RepeatableReader) Read(p []byte) (n int, err error)

func (*RepeatableReader) Reset

func (rr *RepeatableReader) Reset() error

Jump to

Keyboard shortcuts

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