mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00

Motivated to have a working `make lint` on Fedora 37 (beta). Most changes come from the new `gofmt` standards. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
18 lines
430 B
Go
18 lines
430 B
Go
/*
|
|
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
|