mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
11 lines
131 B
Go
11 lines
131 B
Go
package future
|
|
|
|
import ()
|
|
|
|
func Go(f func() error) chan error {
|
|
ch := make(chan error)
|
|
go func() {
|
|
ch <- f()
|
|
}()
|
|
return ch
|
|
}
|