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

volume/mounts: minor formatting and linting fixes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-07-26 12:51:38 +02:00
parent efb87ad106
commit f77eb5349b
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -90,7 +90,6 @@ type mountValidator func(mnt *mount.Mount) error
func (p *windowsParser) windowsSplitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]string, error) {
match := splitRegexp.FindStringSubmatch(strings.ToLower(raw))
// Must have something back
if len(match) == 0 {
return nil, errInvalidSpec(raw)
}
@ -216,7 +215,6 @@ func (defaultFileInfoProvider) fileInfo(path string) (exist, isDir bool, err err
}
func (p *windowsParser) validateMountConfigReg(mnt *mount.Mount, destRegex *regexp.Regexp, additionalValidators ...mountValidator) error {
for _, v := range additionalValidators {
if err := v(mnt); err != nil {
return &errMountConfig{mnt, err}
@ -299,6 +297,7 @@ func (p *windowsParser) validateMountConfigReg(mnt *mount.Mount, destRegex *rege
}
return nil
}
func (p *windowsParser) ParseMountRaw(raw, volumeDriver string) (*MountPoint, error) {
arr, err := p.windowsSplitRawSpec(raw, windowsSplitRawSpecRegexp)
if err != nil {
@ -439,21 +438,23 @@ func (p *windowsParser) ParseVolumesFrom(spec string) (string, string, error) {
}
func (p *windowsParser) DefaultPropagationMode() mount.Propagation {
return mount.Propagation("")
return ""
}
func (p *windowsParser) ConvertTmpfsOptions(opt *mount.TmpfsOptions, readOnly bool) (string, error) {
return "", fmt.Errorf("%s does not support tmpfs", runtime.GOOS)
}
func (p *windowsParser) DefaultCopyMode() bool {
return false
}
func (p *windowsParser) IsBackwardCompatible(m *MountPoint) bool {
return false
}
func (p *windowsParser) ValidateTmpfsMountDestination(dest string) error {
return errors.New("Platform does not support tmpfs")
return errors.New("platform does not support tmpfs")
}
func (p *windowsParser) HasResource(m *MountPoint, absolutePath string) bool {