mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
cleanup: ReconcilePersistentVolume consider passing it by pointer
Address: hugeParam linter internal/controller/persistentvolume/persistentvolume.go:59:7: hugeParam: r is heavy (80 bytes); consider passing it by pointer (gocritic) [...] internal/controller/persistentvolume/persistentvolume.go:135:7: hugeParam: r is heavy (80 bytes); consider passing it by pointer (gocritic) func (r ReconcilePersistentVolume) reconcilePV(ctx context.Context, obj runtime.Object) error {} Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
parent
af0bdaf2cb
commit
29a3f4acf6
@ -52,11 +52,11 @@ var (
|
|||||||
// Init will add the ReconcilePersistentVolume to the list.
|
// Init will add the ReconcilePersistentVolume to the list.
|
||||||
func Init() {
|
func Init() {
|
||||||
// add ReconcilePersistentVolume to the list
|
// add ReconcilePersistentVolume to the list
|
||||||
ctrl.ControllerList = append(ctrl.ControllerList, ReconcilePersistentVolume{})
|
ctrl.ControllerList = append(ctrl.ControllerList, &ReconcilePersistentVolume{})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add adds the newPVReconciler.
|
// Add adds the newPVReconciler.
|
||||||
func (r ReconcilePersistentVolume) Add(mgr manager.Manager, config ctrl.Config) error {
|
func (r *ReconcilePersistentVolume) Add(mgr manager.Manager, config ctrl.Config) error {
|
||||||
return add(mgr, newPVReconciler(mgr, config))
|
return add(mgr, newPVReconciler(mgr, config))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ func checkStaticVolume(pv *corev1.PersistentVolume) bool {
|
|||||||
|
|
||||||
// reconcilePV will extract the image details from the pv spec and regenerates
|
// reconcilePV will extract the image details from the pv spec and regenerates
|
||||||
// the omap data.
|
// the omap data.
|
||||||
func (r ReconcilePersistentVolume) reconcilePV(ctx context.Context, obj runtime.Object) error {
|
func (r *ReconcilePersistentVolume) reconcilePV(ctx context.Context, obj runtime.Object) error {
|
||||||
pv, ok := obj.(*corev1.PersistentVolume)
|
pv, ok := obj.(*corev1.PersistentVolume)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user