mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
3bf0ca31cf
Signed-off-by: David Calavera <david.calavera@gmail.com>
26 lines
504 B
Go
26 lines
504 B
Go
// +build experimental
|
|
|
|
package daemon
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/docker/docker/runconfig"
|
|
"github.com/docker/docker/volume"
|
|
"github.com/docker/docker/volume/drivers"
|
|
)
|
|
|
|
func getVolumeDriver(name string) (volume.Driver, error) {
|
|
if name == "" {
|
|
name = volume.DefaultDriverName
|
|
}
|
|
return volumedrivers.Lookup(name)
|
|
}
|
|
|
|
func parseVolumeSource(spec string, config *runconfig.Config) (string, string, error) {
|
|
if !filepath.IsAbs(spec) {
|
|
return spec, "", nil
|
|
}
|
|
|
|
return "", spec, nil
|
|
}
|