mirror of
https://github.com/containers/skopeo.git
synced 2025-09-24 03:17:17 +00:00
Vendor containers/storage, and its dependencies github.com/pborman/uuid and github.com/mistifyio/go-zfs, which we didn't already use. Update the build Dockerfile to install their dependencies. Add scriptlets that try to detect whether or not we need to use the "libdm_no_deferred_remove" and/or "btrfs_noversion" build tags. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
12 lines
285 B
Go
12 lines
285 B
Go
package promise
|
|
|
|
// Go is a basic promise implementation: it wraps calls a function in a goroutine,
|
|
// and returns a channel which will later return the function's return value.
|
|
func Go(f func() error) chan error {
|
|
ch := make(chan error, 1)
|
|
go func() {
|
|
ch <- f()
|
|
}()
|
|
return ch
|
|
}
|