Documentation ¶
Index ¶
- Variables
- func InitReadWriteCloserSlice(wcp *ReadWriteCloserSlice)
- func InitWriteCloserToChan(wcp *WriteCloserToChan)
- func NewReadWriteCloserSlice() (readWriteCloser io.ReadWriteCloser)
- func NewWriteCloserToChan() (writeCloser io.WriteCloser)
- func NewWriteCloserToChanLine() (writeCloser io.WriteCloser)
- func NewWriteCloserToString() io.WriteCloser
- type ReadWriteCloserSlice
- type WriteCloserToChan
- type WriteCloserToChanLine
- type WriteCloserToString
Constants ¶
This section is empty.
Variables ¶
View Source
var EofReader io.Reader = &eofReader{}
EofReader returns a reader at EOF. Thread-safe
View Source
var ErrFileAlreadyClosed = errors.New("file alread closed")
On write after close, ErrFileAlreadyClosed is returned.
if errors.Is(err, pio.ErrFileAlreadyClosed)…
Functions ¶
func InitReadWriteCloserSlice ¶
func InitReadWriteCloserSlice(wcp *ReadWriteCloserSlice)
func InitWriteCloserToChan ¶
func InitWriteCloserToChan(wcp *WriteCloserToChan)
func NewReadWriteCloserSlice ¶
func NewReadWriteCloserSlice() (readWriteCloser io.ReadWriteCloser)
func NewWriteCloserToChan ¶
func NewWriteCloserToChan() (writeCloser io.WriteCloser)
func NewWriteCloserToChanLine ¶
func NewWriteCloserToChanLine() (writeCloser io.WriteCloser)
func NewWriteCloserToString ¶
func NewWriteCloserToString() io.WriteCloser
NewWriteCloserToString returns an io.WriteCloser that aggregates its oputput in a string. Thread-safe.
Types ¶
type ReadWriteCloserSlice ¶
type ReadWriteCloserSlice struct {
// contains filtered or unexported fields
}
func (*ReadWriteCloserSlice) Close ¶
func (wc *ReadWriteCloserSlice) Close() (err error)
type WriteCloserToChan ¶
type WriteCloserToChan struct {
// contains filtered or unexported fields
}
func (*WriteCloserToChan) Ch ¶
func (wc *WriteCloserToChan) Ch() (readCh <-chan []byte)
func (*WriteCloserToChan) Close ¶
func (wc *WriteCloserToChan) Close() (err error)
type WriteCloserToChanLine ¶
type WriteCloserToChanLine struct {
// contains filtered or unexported fields
}
func (*WriteCloserToChanLine) Ch ¶
func (wc *WriteCloserToChanLine) Ch() (readCh <-chan string)
func (*WriteCloserToChanLine) Close ¶
func (wc *WriteCloserToChanLine) Close() (err error)
type WriteCloserToString ¶
type WriteCloserToString struct {
// contains filtered or unexported fields
}
WriteCloserToString is an io.WriteCloser that aggregates its oputput in a string. Thread-safe.
- the string is available using the Data method.
func (*WriteCloserToString) Close ¶
func (wc *WriteCloserToString) Close() (err error)
Close should only be invoked once. Close is not required for releasing resources.
func (*WriteCloserToString) Data ¶
func (wc *WriteCloserToString) Data() (s string)
Data returns current string data
Click to show internal directories.
Click to hide internal directories.