kmgIo

package
v0.0.0-...-05317bf Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiscardReadFrom = ioutil.Discard.(io.ReaderFrom).ReadFrom

将所有内容都读出来,但是将结果全部扔掉,只返回读取的字节数量

View Source
var NopCloser io.Closer = nopCloser{}

Functions

func ErrorHandlerNil

func ErrorHandlerNil() error

func FmtByteNum

func FmtByteNum(byteNum int) string

func FmtByteSpeed

func FmtByteSpeed(byteNum int, dur time.Duration) string

func MultiCloser

func MultiCloser(closers ...io.Closer) io.Closer

func MultiErrorHandle

func MultiErrorHandle(fs ...func() error) error

func MustReadAll

func MustReadAll(r io.Reader) (b []byte)

func NewDebugRwc

func NewDebugRwc(rwc io.ReadWriteCloser, name string) debugRwc

func NewDebugRwcNoData

func NewDebugRwcNoData(rwc io.ReadWriteCloser, name string) debugRwc

func NewMultiErrorHandler

func NewMultiErrorHandler(fs ...func() error) func() error

func NewSumSizeRwc

func NewSumSizeRwc(rwc io.ReadWriteCloser, name string) io.ReadWriteCloser

func TwoWayPipe

func TwoWayPipe() (rwc1 io.ReadWriteCloser, rwc2 io.ReadWriteCloser)

Types

type CloserFunc

type CloserFunc func() (err error)

func (CloserFunc) Close

func (f CloserFunc) Close() (err error)

type RwcWrapper

type RwcWrapper interface {
	RwcWrap(in io.ReadWriteCloser) (out io.ReadWriteCloser, err error)
}

把一个rwc转换成另一个rwc

type RwcWrapperFunc

type RwcWrapperFunc func(in io.ReadWriteCloser) (out io.ReadWriteCloser, err error)

func (RwcWrapperFunc) RwcWrap

func (f RwcWrapperFunc) RwcWrap(in io.ReadWriteCloser) (out io.ReadWriteCloser, err error)

type SingleByteReader

type SingleByteReader interface {
	io.Reader
	io.ByteReader
}

func NewSingleByteReader

func NewSingleByteReader(r io.Reader) SingleByteReader

type StructWriterReaderCloser

type StructWriterReaderCloser struct {
	io.Writer
	io.Reader
	io.Closer
}

Jump to

Keyboard shortcuts

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