mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 14:20:23 -04:00
22 lines
449 B
Go
22 lines
449 B
Go
![]() |
package client // import "github.com/docker/docker/client"
|
||
|
|
||
|
import (
|
||
|
"net/url"
|
||
|
|
||
|
"golang.org/x/net/context"
|
||
|
)
|
||
|
|
||
|
// BuildCancel requests the daemon to cancel ongoing build request
|
||
|
func (cli *Client) BuildCancel(ctx context.Context, id string) error {
|
||
|
query := url.Values{}
|
||
|
query.Set("id", id)
|
||
|
|
||
|
serverResp, err := cli.post(ctx, "/build/cancel", query, nil, nil)
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
defer ensureReaderClosed(serverResp)
|
||
|
|
||
|
return nil
|
||
|
}
|