]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise/promise.go
provider: Ensured Go 1.11 in TravisCI and README
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / fsouza / go-dockerclient / external / github.com / docker / docker / pkg / promise / promise.go
CommitLineData
9b12e4fe
JC
1package promise
2
3// Go is a basic promise implementation: it wraps calls a function in a goroutine,
4// and returns a channel which will later return the function's return value.
5func Go(f func() error) chan error {
6 ch := make(chan error, 1)
7 go func() {
8 ch <- f()
9 }()
10 return ch
11}