mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
cleanup: resolve nlreturn linter issues
nlreturn linter requires a new line before return and branch statements except when the return is alone inside a statement group (such as an if statement) to increase code clarity. This commit addresses such issues. Updates: #1586 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -44,16 +44,19 @@ type CSIDriver struct {
|
||||
func NewCSIDriver(name, v, nodeID string) *CSIDriver {
|
||||
if name == "" {
|
||||
klog.Errorf("Driver name missing")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
if nodeID == "" {
|
||||
klog.Errorf("NodeID missing")
|
||||
|
||||
return nil
|
||||
}
|
||||
// TODO version format and validation
|
||||
if v == "" {
|
||||
klog.Errorf("Version argument missing")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -78,6 +81,7 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return status.Error(codes.InvalidArgument, fmt.Sprintf("%s", c)) //nolint
|
||||
}
|
||||
|
||||
@ -103,6 +107,7 @@ func (d *CSIDriver) AddVolumeCapabilityAccessModes(
|
||||
vca = append(vca, NewVolumeCapabilityAccessMode(c))
|
||||
}
|
||||
d.vc = vca
|
||||
|
||||
return vca
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user