mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-11 22:01:02 -04:00
21 lines
568 B
Go
21 lines
568 B
Go
![]() |
package 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
|
||
|
}
|