mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
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:
committed by
mergify[bot]
parent
8f82a30c21
commit
cc6d67a7d6
@ -131,7 +131,8 @@ type TopologyConstrainedPool struct {
|
||||
|
||||
// GetTopologyFromRequest extracts TopologyConstrainedPools and passed in accessibility constraints
|
||||
// from a CSI CreateVolume request.
|
||||
func GetTopologyFromRequest(req *csi.CreateVolumeRequest) (*[]TopologyConstrainedPool, *csi.TopologyRequirement, error) {
|
||||
func GetTopologyFromRequest(
|
||||
req *csi.CreateVolumeRequest) (*[]TopologyConstrainedPool, *csi.TopologyRequirement, error) {
|
||||
var (
|
||||
topologyPools []TopologyConstrainedPool
|
||||
)
|
||||
@ -151,7 +152,10 @@ func GetTopologyFromRequest(req *csi.CreateVolumeRequest) (*[]TopologyConstraine
|
||||
// extract topology based pools configuration
|
||||
err := json.Unmarshal([]byte(strings.Replace(topologyPoolsStr, "\n", " ", -1)), &topologyPools)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to parse JSON encoded topology constrained pools parameter (%s): %v", topologyPoolsStr, err)
|
||||
return nil, nil, fmt.Errorf(
|
||||
"failed to parse JSON encoded topology constrained pools parameter (%s): %v",
|
||||
topologyPoolsStr,
|
||||
err)
|
||||
}
|
||||
|
||||
return &topologyPools, accessibilityRequirements, nil
|
||||
|
Reference in New Issue
Block a user