mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
21 lines
563 B
Go
21 lines
563 B
Go
package docker // import "docker.io/go-docker"
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"docker.io/go-docker/api/types/versions"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// VolumeRemove removes a volume from the docker host.
|
|
func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error {
|
|
query := url.Values{}
|
|
if versions.GreaterThanOrEqualTo(cli.version, "1.25") {
|
|
if force {
|
|
query.Set("force", "1")
|
|
}
|
|
}
|
|
resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil)
|
|
ensureReaderClosed(resp)
|
|
return wrapResponseError(err, resp, "volume", volumeID)
|
|
}
|