import ( "context" "github.com/docker/docker/client" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/volume" ) func createVolume(volName string) error { cli, err := client.NewEnvClient() if err != nil { return err } _, err = cli.VolumeCreate(context.Background(), volume.CreateRequest{ Name: volName, }) return err } func removeVolume(volName string) error { cli, err := client.NewEnvClient() if err != nil { return err } err = cli.VolumeRemove(context.Background(), volName, true) if err != nil { return err } return nil } func listVolumes() ([]types.Volume, error) { cli, err := client.NewEnvClient() if err != nil { return nil, err } volumes, err := cli.VolumeList(context.Background(), types.VolumeListOptions{}) if err != nil { return nil, err } return volumes.Volumes, nil }The `createVolume()` function creates a new Docker volume with the specified name. The `removeVolume()` function removes an existing Docker volume by name. The `listVolumes()` function lists all Docker volumes on the host. All three functions use the `github.com/docker/docker/client` package to create a new Docker client and interact with Docker volumes using the `github.com/docker/docker/volume` package.