1package client // import "github.com/docker/docker/client" 2 3import ( 4 "context" 5 "net/url" 6 7 "github.com/docker/docker/api/types" 8) 9 10// CheckpointDelete deletes the checkpoint with the given name from the given container 11func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error { 12 query := url.Values{} 13 if options.CheckpointDir != "" { 14 query.Set("dir", options.CheckpointDir) 15 } 16 17 resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) 18 ensureReaderClosed(resp) 19 return err 20} 21