mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33: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:
@ -102,6 +102,7 @@ func GetTopologyFromDomainLabels(domainLabels, nodeName, driverName string) (map
|
||||
missingLabels = append(missingLabels, key)
|
||||
}
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("missing domain labels %v on node %q", missingLabels, nodeName)
|
||||
}
|
||||
|
||||
@ -173,6 +174,7 @@ func MatchTopologyForPool(topologyPools *[]TopologyConstrainedPool,
|
||||
for _, value := range *topologyPools {
|
||||
if value.PoolName == poolName {
|
||||
topologyPool = append(topologyPool, value)
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -230,6 +232,7 @@ func matchPoolToTopology(topologyPools *[]TopologyConstrainedPool, topology *csi
|
||||
for _, segment := range topologyPool.DomainSegments {
|
||||
if domainValue, ok := domainMap[segment.DomainLabel]; !ok || domainValue != segment.DomainValue {
|
||||
mismatch = true
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user