github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/channel/doc.go (about) 1 /* 2 Package channel provides helper structs/methods/funcs for working with channels 3 4 Proxy from an io.Writer to a channel: 5 6 w := channel.NewWriter(make(chan []byte, 10)) 7 go func() { 8 w.Write([]byte("Hello, World")) 9 }() 10 11 fmt.Println(string(<-w.Chan())) 12 w.Close() 13 14 Use of the constructor is required to initialize the channel. 15 Provide a channel of sufficient size to handle messages from writer(s). 16 */ 17 package channel