internal: reformat long lines in internal/util package to 120 chars

We have many declarations and invocations..etc with long lines which are
very difficult to follow while doing code reading. This address the issues
in 'internal/util' package files to restrict the line length to 120 chars.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal
2021-06-25 17:45:08 +05:30
committed by mergify[bot]
parent 8f82a30c21
commit cc6d67a7d6
6 changed files with 45 additions and 12 deletions

View File

@ -27,7 +27,10 @@ func ValidateNodeStageVolumeRequest(req *csi.NodeStageVolumeRequest) error {
// validate stagingpath exists
ok := checkDirExists(req.GetStagingTargetPath())
if !ok {
return status.Errorf(codes.InvalidArgument, "staging path %s does not exist on node", req.GetStagingTargetPath())
return status.Errorf(
codes.InvalidArgument,
"staging path %s does not exist on node",
req.GetStagingTargetPath())
}
return nil
}
@ -83,7 +86,8 @@ func ValidateNodeUnpublishVolumeRequest(req *csi.NodeUnpublishVolumeRequest) err
// volume is from source as empty ReadOnlyMany is not supported.
func CheckReadOnlyManyIsSupported(req *csi.CreateVolumeRequest) error {
for _, capability := range req.GetVolumeCapabilities() {
if m := capability.GetAccessMode().Mode; m == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY || m == csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY {
if m := capability.GetAccessMode().Mode; m == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
m == csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY {
if req.GetVolumeContentSource() == nil {
return status.Error(codes.InvalidArgument, "readOnly accessMode is supported only with content source")
}