 4f2b443a27
			
		
	
	4f2b443a27
	
	
	
		
			
			This rewrites the Go imports after switching to the new github org. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			606 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			606 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import (
 | |
| 	gocontext "context"
 | |
| 	"errors"
 | |
| 
 | |
| 	"github.com/containerd/containerd/api/services/execution"
 | |
| 	"github.com/urfave/cli"
 | |
| )
 | |
| 
 | |
| var deleteCommand = cli.Command{
 | |
| 	Name:      "delete",
 | |
| 	Usage:     "delete an existing container",
 | |
| 	ArgsUsage: "CONTAINER",
 | |
| 	Action: func(context *cli.Context) error {
 | |
| 		containers, err := getExecutionService(context)
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		id := context.Args().First()
 | |
| 		if id == "" {
 | |
| 			return errors.New(" id must be provided")
 | |
| 		}
 | |
| 		_, err = containers.Delete(gocontext.Background(), &execution.DeleteRequest{
 | |
| 			ID: id,
 | |
| 		})
 | |
| 		return err
 | |
| 	},
 | |
| }
 |