Move NewClient and AppContext to commands pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
		@@ -1,13 +1,16 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import "github.com/urfave/cli"
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/containerd/containerd/cmd/ctr/commands"
 | 
			
		||||
	"github.com/urfave/cli"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var taskPauseCommand = cli.Command{
 | 
			
		||||
	Name:      "pause",
 | 
			
		||||
	Usage:     "pause an existing 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
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user