github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/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