iochan

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 2 Imported by: 418

README

iochan

iochan is a Go library for treating io readers and writers like channels. This is useful when sometimes you wish to use io.Reader and such in select statements.

Installation

Standard go get:

$ go get github.com/mitchellh/iochan

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelimReader

func DelimReader(r io.Reader, delim byte) <-chan string

DelimReader takes an io.Reader and produces the contents of the reader on the returned channel. The contents on the channel will be returned on boundaries specified by the delim parameter, and will include this delimiter.

If an error occurs while reading from the reader, the reading will end.

In the case of an EOF or error, the channel will be closed.

This must only be called once for any individual reader. The behavior is unknown and will be unexpected if this is called multiple times with the same reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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