 00288bcb58
			
		
	
	00288bcb58
	
	
	
		
			
			This moves container and tasks commands under the containers and tasks top level commands. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			556 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			556 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import "github.com/urfave/cli"
 | |
| 
 | |
| var taskResumeCommand = cli.Command{
 | |
| 	Name:      "resume",
 | |
| 	Usage:     "resume a paused container",
 | |
| 	ArgsUsage: "CONTAINER",
 | |
| 	Action: func(context *cli.Context) error {
 | |
| 		ctx, cancel := appContext(context)
 | |
| 		defer cancel()
 | |
| 
 | |
| 		client, err := newClient(context)
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		container, err := client.LoadContainer(ctx, context.Args().First())
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		task, err := container.Task(ctx, nil)
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		return task.Resume(ctx)
 | |
| 	},
 | |
| }
 |