Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipe ¶
type Pipe struct { R io.ReadCloser W io.WriteCloser }
`iox.Pipe` wraps the read and write ends of a pipe and provides helper methods to close them once. Example:
pipe, err := iox.WrapPipe3(os.Pipe()) if err != nil { return err } defer pipe.CloseBoth() ... // Tell consumer EOF. if err := pipe.CloseW(); err != nil { ... }
func WrapPipe ¶
func WrapPipe(r io.ReadCloser, w io.WriteCloser) *Pipe
func WrapPipe3 ¶
func WrapPipe3(r io.ReadCloser, w io.WriteCloser, err error) (*Pipe, error)
Click to show internal directories.
Click to hide internal directories.