]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - 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
1 package 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.
5 func Go(f func() error) chan error {
6 ch := make(chan error, 1)
7 go func() {
8 ch <- f()
9 }()
10 return ch
11 }