53d9609de4
Signed-off-by: David Calavera <david.calavera@gmail.com>
25 lines
440 B
Go
25 lines
440 B
Go
// +build experimental
|
|
|
|
package daemon
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"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) (string, string, error) {
|
|
if !filepath.IsAbs(spec) {
|
|
return spec, "", nil
|
|
}
|
|
|
|
return "", spec, nil
|
|
}
|