Skip to content

Commit

Permalink
Fix Go vet errors for master golang
Browse files Browse the repository at this point in the history
Co-authored-by: Rajalakshmi-Girish <[email protected]>
Co-authored-by: Abhishek Kr Srivastav <[email protected]>

Kubernetes-commit: 9d10ddb0608aa20ce287c89be879f888f5823cf9
  • Loading branch information
srivastav-abhishek authored and k8s-publishing-bot committed Sep 12, 2024
1 parent f8cafad commit 6300cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target
sensitiveOptionsLog := sanitizedOptionsForLogging(options, sensitiveOptions)
detailedErr := fmt.Sprintf("format of disk %q failed: type:(%q) target:(%q) options:(%q) errcode:(%v) output:(%v) ", source, fstype, target, sensitiveOptionsLog, err, string(output))
klog.Error(detailedErr)
return NewMountError(FormatFailed, detailedErr)
return NewMountError(FormatFailed, "%s", detailedErr)
}

klog.Infof("Disk successfully formatted (mkfs): %s - %s %s", fstype, source, target)
Expand All @@ -646,7 +646,7 @@ func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target
// Mount the disk
klog.V(4).Infof("Attempting to mount disk %s in %s format at %s", source, fstype, target)
if err := mounter.MountSensitive(source, target, fstype, options, sensitiveOptions); err != nil {
return NewMountError(mountErrorValue, err.Error())
return NewMountError(mountErrorValue, "%s", err.Error())
}

return nil
Expand Down

0 comments on commit 6300cbb

Please sign in to comment.