github.com/endophage/docker@v1.4.2-0.20161027011718-242853499895/cli/command/checkpoint/remove.go (about) 1 package checkpoint 2 3 import ( 4 "golang.org/x/net/context" 5 6 "github.com/docker/docker/cli" 7 "github.com/docker/docker/cli/command" 8 "github.com/spf13/cobra" 9 ) 10 11 func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command { 12 return &cobra.Command{ 13 Use: "rm CONTAINER CHECKPOINT", 14 Aliases: []string{"remove"}, 15 Short: "Remove a checkpoint", 16 Args: cli.ExactArgs(2), 17 RunE: func(cmd *cobra.Command, args []string) error { 18 return runRemove(dockerCli, args[0], args[1]) 19 }, 20 } 21 } 22 23 func runRemove(dockerCli *command.DockerCli, container string, checkpoint string) error { 24 client := dockerCli.Client() 25 return client.CheckpointDelete(context.Background(), container, checkpoint) 26 }