util: correct interface name and remove redundancy

ContollerManager had a typo in it, and if we correct it,
linter  will fail and suggest not to use controller.ControllerManager
as the interface name and package name  is redundant, keeping manager
as the interface name which is the practice and also address the
linter issues.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2021-08-18 09:46:11 +05:30 committed by mergify[bot]
parent 763387c8e2
commit 9ac1391d0f
2 changed files with 5 additions and 5 deletions

View File

@ -25,10 +25,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager/signals" "sigs.k8s.io/controller-runtime/pkg/manager/signals"
) )
// ContollerManager is the interface that will wrap Add function. // Manager is the interface that will wrap Add function.
// The New controllers which gets added, as to implement Add function to get // The New controllers which gets added, as to implement Add function to get
// started by the manager. // started by the manager.
type ContollerManager interface { type Manager interface {
Add(manager.Manager, Config) error Add(manager.Manager, Config) error
} }
@ -39,7 +39,7 @@ type Config struct {
} }
// ControllerList holds the list of managers need to be started. // ControllerList holds the list of managers need to be started.
var ControllerList []ContollerManager var ControllerList []Manager
// addToManager calls the registered managers Add method. // addToManager calls the registered managers Add method.
func addToManager(mgr manager.Manager, config Config) error { func addToManager(mgr manager.Manager, config Config) error {

View File

@ -45,8 +45,8 @@ type ReconcilePersistentVolume struct {
} }
var ( var (
_ reconcile.Reconciler = &ReconcilePersistentVolume{} _ reconcile.Reconciler = &ReconcilePersistentVolume{}
_ ctrl.ContollerManager = &ReconcilePersistentVolume{} _ ctrl.Manager = &ReconcilePersistentVolume{}
) )
// Init will add the ReconcilePersistentVolume to the list. // Init will add the ReconcilePersistentVolume to the list.