summaryrefslogtreecommitdiff
path: root/pkg/channel/doc.go
blob: 656fbddaa8f086c161bc4b6c47853be28dc46f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
Package channel provides helper structs/methods/funcs for working with channels

Proxy from an io.Writer to a channel:

	w := channel.NewWriter(make(chan []byte, 10))
	go func() {
		w.Write([]byte("Hello, World"))
	}()

	fmt.Println(string(<-w.Chan()))
    w.Close()

Use of the constructor is required to initialize the channel.
Provide a channel of sufficient size to handle messages from writer(s).
*/
package channel