mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4f0d95fa6e
Signed-off-by: Daniel Nephin <dnephin@docker.com>
20 lines
612 B
Go
20 lines
612 B
Go
package client // import "github.com/docker/docker/client"
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"github.com/docker/docker/api/types"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// CheckpointDelete deletes the checkpoint with the given name from the given container
|
|
func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error {
|
|
query := url.Values{}
|
|
if options.CheckpointDir != "" {
|
|
query.Set("dir", options.CheckpointDir)
|
|
}
|
|
|
|
resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|