Documentation ¶
Index ¶
- Variables
- func ErrorHandlerNil() error
- func FmtByteNum(byteNum int) string
- func FmtByteSpeed(byteNum int, dur time.Duration) string
- func MultiCloser(closers ...io.Closer) io.Closer
- func MultiErrorHandle(fs ...func() error) error
- func MustReadAll(r io.Reader) (b []byte)
- func NewDebugReader(r io.Reader, name string) *debugReader
- func NewDebugRwc(rwc io.ReadWriteCloser, name string) debugRwc
- func NewDebugRwcNoData(rwc io.ReadWriteCloser, name string) debugRwc
- func NewDebugWriter(w io.Writer, name string) *debugWriter
- func NewLockWriter(w io.Writer) io.Writer
- func NewMultiErrorHandler(fs ...func() error) func() error
- func NewReadAddCloser(r io.Reader, closer io.Closer) io.ReadCloser
- func NewReaderWithNopCloser(r io.Reader) io.ReadCloser
- func NewRwcFromReader(r io.Reader) io.ReadWriteCloser
- func NewSumSizeRwc(rwc io.ReadWriteCloser, name string) io.ReadWriteCloser
- func NewWriteAddCloser(w io.Writer, closer io.Closer) io.WriteCloser
- func NewWriterWrapToReaderWrap(newWriter func(w1 io.Writer) (w2 io.WriteCloser), r1 io.Reader) (r2 io.Reader)
- func ReadAll(r io.Reader) (b []byte, err error)
- func TwoWayPipe() (rwc1 io.ReadWriteCloser, rwc2 io.ReadWriteCloser)
- type CallbackReaderWriterCloser
- type CloserFunc
- type LimitReader
- type LockWriter
- type RwcWrapper
- type RwcWrapperFunc
- type SingleByteReader
- type StructWriterReaderCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var DiscardReadFrom = ioutil.Discard.(io.ReaderFrom).ReadFrom
View Source
var Nop = tnop{}
View Source
var NopCloser io.Closer = Nop
Functions ¶
func ErrorHandlerNil ¶
func ErrorHandlerNil() error
func FmtByteNum ¶
func MultiErrorHandle ¶
func MustReadAll ¶
func NewDebugReader ¶
func NewDebugRwc ¶
func NewDebugRwc(rwc io.ReadWriteCloser, name string) debugRwc
func NewDebugRwcNoData ¶
func NewDebugRwcNoData(rwc io.ReadWriteCloser, name string) debugRwc
func NewDebugWriter ¶
func NewMultiErrorHandler ¶
func NewReadAddCloser ¶
func NewReaderWithNopCloser ¶
func NewReaderWithNopCloser(r io.Reader) io.ReadCloser
func NewRwcFromReader ¶
func NewRwcFromReader(r io.Reader) io.ReadWriteCloser
func NewSumSizeRwc ¶
func NewSumSizeRwc(rwc io.ReadWriteCloser, name string) io.ReadWriteCloser
func NewWriteAddCloser ¶
func TwoWayPipe ¶
func TwoWayPipe() (rwc1 io.ReadWriteCloser, rwc2 io.ReadWriteCloser)
Types ¶
type CallbackReaderWriterCloser ¶
type CallbackReaderWriterCloser struct { Reader func(b []byte) (n int, err error) Writer func(b []byte) (n int, err error) Closer func() (err error) }
func (CallbackReaderWriterCloser) Close ¶
func (crwc CallbackReaderWriterCloser) Close() (err error)
type CloserFunc ¶
type CloserFunc func() (err error)
func (CloserFunc) Close ¶
func (f CloserFunc) Close() (err error)
type LimitReader ¶
type LimitReader struct {
// contains filtered or unexported fields
}
func NewLimitReader ¶
func NewLimitReader(r io.Reader, n int64) *LimitReader
func (*LimitReader) IsUnderReaderEof ¶
func (l *LimitReader) IsUnderReaderEof() bool
type LockWriter ¶
type RwcWrapper ¶
type RwcWrapper interface {
RwcWrap(in io.ReadWriteCloser) (out io.ReadWriteCloser, err error)
}
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
Click to show internal directories.
Click to hide internal directories.