diff --git a/mount.go b/mount.go index 112d7ebc178..77ec9c6d329 100644 --- a/mount.go +++ b/mount.go @@ -346,14 +346,14 @@ func StartsWithBackstep(rel string) bool { return rel == ".." || strings.HasPrefix(filepath.ToSlash(rel), "../") } -// sanitizedOptionsForLogging will return a comma seperated string containing +// sanitizedOptionsForLogging will return a comma separated string containing // options and sensitiveOptions. Each entry in sensitiveOptions will be // replaced with the string sensitiveOptionsRemoved // e.g. o1,o2,, func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) string { - seperator := "" + separator := "" if len(options) > 0 && len(sensitiveOptions) > 0 { - seperator = "," + separator = "," } sensitiveOptionsStart := "" @@ -364,7 +364,7 @@ func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) str } return strings.Join(options, ",") + - seperator + + separator + sensitiveOptionsStart + sensitiveOptionsEnd } diff --git a/mount_linux.go b/mount_linux.go index 41f69efe3f0..4de29ee322d 100644 --- a/mount_linux.go +++ b/mount_linux.go @@ -103,7 +103,7 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri } // doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used. -// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) +// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) func (mounter *Mounter) doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string, sensitiveOptions []string) error { mountArgs, mountArgsLogStr := MakeMountArgsSensitive(source, target, fstype, options, sensitiveOptions) if len(mounterPath) > 0 { @@ -187,7 +187,7 @@ func MakeMountArgs(source, target, fstype string, options []string) (mountArgs [ } // MakeMountArgsSensitive makes the arguments to the mount(8) command. -// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) +// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) { // Build mount command as follows: // mount [-t $fstype] [-o $options] [$source] $target