summaryrefslogtreecommitdiff
path: root/volume/mounts
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2021-07-26 12:51:38 +0200
committerSebastiaan van Stijn <github@gone.nl>2021-07-27 09:57:24 +0200
commitf77eb5349b6603491fabfb7f0ca007b144af722f (patch)
treea5dc3f2904b01fa89d1c233f6c43f9e6576cf0e7 /volume/mounts
parentefb87ad106ffc160edf86e6bba0c7a5e6b1a1032 (diff)
downloaddocker-f77eb5349b6603491fabfb7f0ca007b144af722f.tar.gz
volume/mounts: minor formatting and linting fixes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'volume/mounts')
-rw-r--r--volume/mounts/windows_parser.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/volume/mounts/windows_parser.go b/volume/mounts/windows_parser.go
index 2cb135f77b..0778cfe260 100644
--- a/volume/mounts/windows_parser.go
+++ b/volume/mounts/windows_parser.go
@@ -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 {