Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DevZero devZero
DevZero is like is like /dev/zero for reading and /dev/null for writing
EmptyRdr is a reader that will always be empty
Functions ¶
func NewReadFirstCloseList ¶
NewReadFirstCloseList is a wraper that reads the provided reader but when closed will close the provided readers. Useful when you have io.Readers wrapping io.ReadClosers.
Types ¶
type ReadAtReader ¶
ReadAtReader is io.ReaderAt + io.Reader
func NewReadAtReader ¶
func NewReadAtReader(rdrAt io.ReaderAt) ReadAtReader
NewReadAtReader returns a reader that using a io.ReaderAt's ReadAt in conjunction with its own position counter. This is useful when you have a io.ReaderAt that is not also a io.Reader or you want to share an io.ReaderAt that is also an io.Reader without modifying its position. For example os.File's position is on the OS/kernel side meaning normally sharing it requires locking... or using ReadAt at as we do here.
type WriterAtWriter ¶
WriterAtWriter is io.WriterAt + io.Writer
func NewWriteAtWriter ¶
func NewWriteAtWriter(wtrAt io.WriterAt) WriterAtWriter
NewWriteAtWriter returns a writer that using a io.WriterAt's WriteAt in conjunction with its own position counter. See NewReadAtReader for a detailed explanation of why is this is often useful.