mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
cleanup: address golangci 'funcorder' linter problems
The new 'funcorder' linter expects all public functions to be placed before private functions of a struct. Many private functions needed moving further down into their files. Some files had many issues reported. To reduce the churn in those files, they have been annotated with a `//nolint:funcorder` comment. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
0907f39d95
commit
0a22e3a186
@ -150,6 +150,29 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reconcile reconciles the VolumeGroupReplicationContent object and creates a new omap entries
|
||||
// for the volume group.
|
||||
func (r *ReconcileVGRContent) Reconcile(ctx context.Context,
|
||||
request reconcile.Request,
|
||||
) (reconcile.Result, error) {
|
||||
vgrc := &replicationv1alpha1.VolumeGroupReplicationContent{}
|
||||
err := r.client.Get(ctx, request.NamespacedName, vgrc)
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
return reconcile.Result{}, err
|
||||
}
|
||||
|
||||
// Proceed with reconciliation only if the object is not marked for deletion.
|
||||
if vgrc.GetDeletionTimestamp().IsZero() {
|
||||
err = r.reconcileVGRContent(ctx, vgrc)
|
||||
}
|
||||
|
||||
return reconcile.Result{}, err
|
||||
}
|
||||
|
||||
func (r *ReconcileVGRContent) getSecrets(
|
||||
ctx context.Context,
|
||||
name,
|
||||
@ -222,26 +245,3 @@ func (r *ReconcileVGRContent) reconcileVGRContent(ctx context.Context, obj runti
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reconcile reconciles the VolumeGroupReplicationContent object and creates a new omap entries
|
||||
// for the volume group.
|
||||
func (r *ReconcileVGRContent) Reconcile(ctx context.Context,
|
||||
request reconcile.Request,
|
||||
) (reconcile.Result, error) {
|
||||
vgrc := &replicationv1alpha1.VolumeGroupReplicationContent{}
|
||||
err := r.client.Get(ctx, request.NamespacedName, vgrc)
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
return reconcile.Result{}, err
|
||||
}
|
||||
|
||||
// Proceed with reconciliation only if the object is not marked for deletion.
|
||||
if vgrc.GetDeletionTimestamp().IsZero() {
|
||||
err = r.reconcileVGRContent(ctx, vgrc)
|
||||
}
|
||||
|
||||
return reconcile.Result{}, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user