2018-03-22 17:11:03 -04:00
|
|
|
package service // import "github.com/docker/docker/volume/service"
|
2015-09-09 22:23:06 -04:00
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
2017-08-22 18:25:31 -04:00
|
|
|
// normalizeVolumeName is a platform specific function to normalize the name
|
2015-09-09 22:23:06 -04: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 11:00:39 -05:00
|
|
|
// Hence we can't allow the volume "John" and "john" to be created as separate
|
2015-09-09 22:23:06 -04:00
|
|
|
// volumes.
|
2017-08-22 18:25:31 -04:00
|
|
|
func normalizeVolumeName(name string) string {
|
2015-09-09 22:23:06 -04:00
|
|
|
return strings.ToLower(name)
|
|
|
|
}
|