Move Go() promise-like func from utils to pkg/promise
This is the first of two steps to break the archive package's dependence on utils so that archive may be moved into pkg. Also, the `Go()` function is small, concise, and not specific to the docker internals, so it is a good candidate for pkg. Signed-off-by: Rafe Colton <rafael.colton@gmail.com> Upstream-commit: b845a62149d5f4990462ac6c9167c5cfaa0e66cb Component: engine
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
"github.com/docker/docker/pkg/jsonlog"
|
||||
"github.com/docker/docker/pkg/log"
|
||||
"github.com/docker/docker/pkg/promise"
|
||||
"github.com/docker/docker/utils"
|
||||
)
|
||||
|
||||
@ -246,7 +247,7 @@ func (daemon *Daemon) Attach(streamConfig *StreamConfig, openStdin, stdinOnce, t
|
||||
}()
|
||||
}
|
||||
|
||||
return utils.Go(func() error {
|
||||
return promise.Go(func() error {
|
||||
defer func() {
|
||||
if cStdout != nil {
|
||||
cStdout.Close()
|
||||
|
||||
Reference in New Issue
Block a user