volume/mounts: minor formatting and linting fixes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
efb87ad106
commit
f77eb5349b
1 changed files with 5 additions and 4 deletions
|
@ -90,7 +90,6 @@ type mountValidator func(mnt *mount.Mount) error
|
||||||
|
|
||||||
func (p *windowsParser) windowsSplitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]string, error) {
|
func (p *windowsParser) windowsSplitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]string, error) {
|
||||||
match := splitRegexp.FindStringSubmatch(strings.ToLower(raw))
|
match := splitRegexp.FindStringSubmatch(strings.ToLower(raw))
|
||||||
// Must have something back
|
|
||||||
if len(match) == 0 {
|
if len(match) == 0 {
|
||||||
return nil, errInvalidSpec(raw)
|
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 {
|
func (p *windowsParser) validateMountConfigReg(mnt *mount.Mount, destRegex *regexp.Regexp, additionalValidators ...mountValidator) error {
|
||||||
|
|
||||||
for _, v := range additionalValidators {
|
for _, v := range additionalValidators {
|
||||||
if err := v(mnt); err != nil {
|
if err := v(mnt); err != nil {
|
||||||
return &errMountConfig{mnt, err}
|
return &errMountConfig{mnt, err}
|
||||||
|
@ -299,6 +297,7 @@ func (p *windowsParser) validateMountConfigReg(mnt *mount.Mount, destRegex *rege
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) ParseMountRaw(raw, volumeDriver string) (*MountPoint, error) {
|
func (p *windowsParser) ParseMountRaw(raw, volumeDriver string) (*MountPoint, error) {
|
||||||
arr, err := p.windowsSplitRawSpec(raw, windowsSplitRawSpecRegexp)
|
arr, err := p.windowsSplitRawSpec(raw, windowsSplitRawSpecRegexp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -439,21 +438,23 @@ func (p *windowsParser) ParseVolumesFrom(spec string) (string, string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) DefaultPropagationMode() mount.Propagation {
|
func (p *windowsParser) DefaultPropagationMode() mount.Propagation {
|
||||||
return mount.Propagation("")
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) ConvertTmpfsOptions(opt *mount.TmpfsOptions, readOnly bool) (string, error) {
|
func (p *windowsParser) ConvertTmpfsOptions(opt *mount.TmpfsOptions, readOnly bool) (string, error) {
|
||||||
return "", fmt.Errorf("%s does not support tmpfs", runtime.GOOS)
|
return "", fmt.Errorf("%s does not support tmpfs", runtime.GOOS)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) DefaultCopyMode() bool {
|
func (p *windowsParser) DefaultCopyMode() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) IsBackwardCompatible(m *MountPoint) bool {
|
func (p *windowsParser) IsBackwardCompatible(m *MountPoint) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *windowsParser) ValidateTmpfsMountDestination(dest string) error {
|
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 {
|
func (p *windowsParser) HasResource(m *MountPoint, absolutePath string) bool {
|
||||||
|
|
Loading…
Reference in a new issue