mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Fix linting issues for exec mounter
This commit is contained in:
parent
f38d4938be
commit
96476fd054
@ -34,6 +34,8 @@ type execMounter struct {
|
|||||||
exec mount.Exec
|
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 {
|
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
|
||||||
return &execMounter{
|
return &execMounter{
|
||||||
wrappedMounter: wrapped,
|
wrappedMounter: wrapped,
|
||||||
@ -66,7 +68,7 @@ func (m *execMounter) doExecMount(source, target, fstype string, options []strin
|
|||||||
output, err := m.exec.Run("mount", mountArgs...)
|
output, err := m.exec.Run("mount", mountArgs...)
|
||||||
klog.V(5).Infof("Exec mounted %v: %v: %s", mountArgs, err, string(output))
|
klog.V(5).Infof("Exec mounted %v: %v: %s", mountArgs, err, string(output))
|
||||||
if err != nil {
|
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))
|
err, "mount", source, target, fstype, options, string(output))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
|
|
||||||
type execMounter struct{}
|
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.
|
// unmount a filesystem. For all other calls it uses a wrapped mounter.
|
||||||
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
|
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
|
||||||
return &execMounter{}
|
return &execMounter{}
|
||||||
@ -85,7 +85,7 @@ func (mounter *execMounter) ExistsPath(pathname string) (bool, error) {
|
|||||||
return true, errors.New("not implemented")
|
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")
|
return "", errors.New("not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user