mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +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:
@ -51,6 +51,7 @@ func (vl *VolumeLocks) TryAcquire(volumeID string) bool {
|
||||
return false
|
||||
}
|
||||
vl.locks.Insert(volumeID)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@ -96,6 +97,7 @@ func NewOperationLock() *OperationLock {
|
||||
lock[cloneOpt] = make(map[string]int)
|
||||
lock[restoreOp] = make(map[string]int)
|
||||
lock[expandOp] = make(map[string]int)
|
||||
|
||||
return &OperationLock{
|
||||
locks: lock,
|
||||
}
|
||||
@ -176,6 +178,7 @@ func (ol *OperationLock) tryAcquire(op operation, volumeID string) error {
|
||||
default:
|
||||
return fmt.Errorf("%v operation not supported", op)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user