Fix linting issues for exec mounter

k3s-v1.15.3
Travis Rhoden 2019-04-11 13:22:14 -06:00
parent f38d4938be
commit 96476fd054
2 changed files with 5 additions and 3 deletions

View File

@ -34,6 +34,8 @@ type execMounter struct {
exec mount.Exec
}
// NewExecMounter returns a mounter that uses provided Exec interface to mount and
// unmount a filesystem. For all other calls it uses a wrapped mounter.
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
return &execMounter{
wrappedMounter: wrapped,
@ -66,7 +68,7 @@ func (m *execMounter) doExecMount(source, target, fstype string, options []strin
output, err := m.exec.Run("mount", mountArgs...)
klog.V(5).Infof("Exec mounted %v: %v: %s", mountArgs, err, string(output))
if err != nil {
return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n",
return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s",
err, "mount", source, target, fstype, options, string(output))
}

View File

@ -27,7 +27,7 @@ import (
type execMounter struct{}
// ExecMounter is a mounter that uses provided Exec interface to mount and
// NewExecMounter returns a mounter that uses provided Exec interface to mount and
// unmount a filesystem. For all other calls it uses a wrapped mounter.
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
return &execMounter{}
@ -85,7 +85,7 @@ func (mounter *execMounter) ExistsPath(pathname string) (bool, error) {
return true, errors.New("not implemented")
}
func (m *execMounter) EvalHostSymlinks(pathname string) (string, error) {
func (mounter *execMounter) EvalHostSymlinks(pathname string) (string, error) {
return "", errors.New("not implemented")
}