github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/client/checkpoint_delete.go (about)

     1  package client
     2  
     3  import (
     4  	"net/url"
     5  
     6  	"github.com/docker/docker/api/types"
     7  	"golang.org/x/net/context"
     8  )
     9  
    10  // CheckpointDelete deletes the checkpoint with the given name from the given container
    11  func (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  }