1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

volume/mounts: rename windowsSplitRawSpec() to splitRawSpec()

It has the windowsParser/lcowParser as receiver, so no need to repeat
that it's for Windows.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-07-26 12:44:12 +02:00
parent f77eb5349b
commit cff0276aaf
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ func (p *lcowParser) ValidateMountConfig(mnt *mount.Mount) error {
}
func (p *lcowParser) ParseMountRaw(raw, volumeDriver string) (*MountPoint, error) {
arr, err := p.windowsSplitRawSpec(raw, lcowSplitRawSpec)
arr, err := p.splitRawSpec(raw, lcowSplitRawSpec)
if err != nil {
return nil, err
}

View file

@ -88,7 +88,7 @@ var (
type mountValidator func(mnt *mount.Mount) error
func (p *windowsParser) windowsSplitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]string, error) {
func (p *windowsParser) splitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]string, error) {
match := splitRegexp.FindStringSubmatch(strings.ToLower(raw))
if len(match) == 0 {
return nil, errInvalidSpec(raw)
@ -299,7 +299,7 @@ func (p *windowsParser) validateMountConfigReg(mnt *mount.Mount, destRegex *rege
}
func (p *windowsParser) ParseMountRaw(raw, volumeDriver string) (*MountPoint, error) {
arr, err := p.windowsSplitRawSpec(raw, windowsSplitRawSpecRegexp)
arr, err := p.splitRawSpec(raw, windowsSplitRawSpecRegexp)
if err != nil {
return nil, err
}