mirror of https://github.com/k3s-io/k3s
Fix linting issues for exec mounter
parent
f38d4938be
commit
96476fd054
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue