mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-20 13:24:38 -04:00
Bumps [github.com/testcontainers/testcontainers-go/modules/opensearch](https://github.com/testcontainers/testcontainers-go) from 0.38.0 to 0.39.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.38.0...v0.39.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/opensearch dependency-version: 0.39.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
22 lines
501 B
Go
22 lines
501 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
|
|
"github.com/docker/docker/api/types/volume"
|
|
)
|
|
|
|
// VolumeCreate creates a volume in the docker host.
|
|
func (cli *Client) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) {
|
|
resp, err := cli.post(ctx, "/volumes/create", nil, options, nil)
|
|
defer ensureReaderClosed(resp)
|
|
if err != nil {
|
|
return volume.Volume{}, err
|
|
}
|
|
|
|
var vol volume.Volume
|
|
err = json.NewDecoder(resp.Body).Decode(&vol)
|
|
return vol, err
|
|
}
|