mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
cleanup: append pointer instead of value to avoid copying lock value
This commit resolves the govet issue - `copylocks: call of append copies lock value ... contains sync.Mutex` Embedding DoNotCopy in a struct is a convention to signal and prevent shallow copies, as recommended in Go's best practices. This does not rely on a language feature but is instead a special case within the vet checker. For more details, see https://golang.org/issues/8005 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -211,7 +211,7 @@ func FindPoolAndTopology(topologyPools *[]TopologyConstrainedPool,
|
||||
|
||||
return "", "", nil, fmt.Errorf("none of the topology constrained pools matched requested "+
|
||||
"topology constraints : pools (%+v) requested topology (%+v)",
|
||||
*topologyPools, *accessibilityRequirements)
|
||||
*topologyPools, accessibilityRequirements)
|
||||
}
|
||||
|
||||
// matchPoolToTopology loops through passed in pools, and for each pool checks if all
|
||||
|
Reference in New Issue
Block a user