2018-03-22 21:11:03 +00:00
|
|
|
package service // import "github.com/docker/docker/volume/service"
|
2015-09-10 02:23:06 +00:00
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
2017-08-22 22:25:31 +00:00
|
|
|
// normalizeVolumeName is a platform specific function to normalize the name
|
2015-09-10 02:23:06 +00:00
|
|
|
// of a volume. On Windows, as NTFS is case insensitive, under
|
|
|
|
// c:\ProgramData\Docker\Volumes\, the folders John and john would be synonymous.
|
2015-12-13 16:00:39 +00:00
|
|
|
// Hence we can't allow the volume "John" and "john" to be created as separate
|
2015-09-10 02:23:06 +00:00
|
|
|
// volumes.
|
2017-08-22 22:25:31 +00:00
|
|
|
func normalizeVolumeName(name string) string {
|
2015-09-10 02:23:06 +00:00
|
|
|
return strings.ToLower(name)
|
|
|
|
}
|