Move NewClient and AppContext to commands pkg

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-25 11:10:00 -04:00
parent 8509569329
commit 4743f1fc4c
33 changed files with 118 additions and 90 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/containerd/console"
"github.com/containerd/containerd"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@@ -14,7 +15,7 @@ var taskAttachCommand = cli.Command{
Usage: "attach to the IO of a running container",
ArgsUsage: "CONTAINER",
Action: func(context *cli.Context) error {
client, ctx, cancel, err := newClient(context)
client, ctx, cancel, err := commands.NewClient(context)
if err != nil {
return err
}