Refactor newClient in ctr
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
		@@ -7,13 +7,11 @@ var taskPauseCommand = cli.Command{
 | 
			
		||||
	Usage:     "pause an existing container",
 | 
			
		||||
	ArgsUsage: "CONTAINER",
 | 
			
		||||
	Action: func(context *cli.Context) error {
 | 
			
		||||
		ctx, cancel := appContext(context)
 | 
			
		||||
		defer cancel()
 | 
			
		||||
 | 
			
		||||
		client, err := newClient(context)
 | 
			
		||||
		client, ctx, cancel, err := newClient(context)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
		defer cancel()
 | 
			
		||||
		container, err := client.LoadContainer(ctx, context.Args().First())
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user