From 9ac1391d0f07924714f03772722ac19eaba13022 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 18 Aug 2021 09:46:11 +0530 Subject: [PATCH] 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 --- internal/controller/controller.go | 6 +++--- internal/controller/persistentvolume/persistentvolume.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/controller/controller.go b/internal/controller/controller.go index d557fef86..d5c78b1d2 100644 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@ -25,10 +25,10 @@ import ( "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 // started by the manager. -type ContollerManager interface { +type Manager interface { Add(manager.Manager, Config) error } @@ -39,7 +39,7 @@ type Config struct { } // ControllerList holds the list of managers need to be started. -var ControllerList []ContollerManager +var ControllerList []Manager // addToManager calls the registered managers Add method. func addToManager(mgr manager.Manager, config Config) error { diff --git a/internal/controller/persistentvolume/persistentvolume.go b/internal/controller/persistentvolume/persistentvolume.go index 7e884e3cd..8fd039ffa 100644 --- a/internal/controller/persistentvolume/persistentvolume.go +++ b/internal/controller/persistentvolume/persistentvolume.go @@ -45,8 +45,8 @@ type ReconcilePersistentVolume struct { } var ( - _ reconcile.Reconciler = &ReconcilePersistentVolume{} - _ ctrl.ContollerManager = &ReconcilePersistentVolume{} + _ reconcile.Reconciler = &ReconcilePersistentVolume{} + _ ctrl.Manager = &ReconcilePersistentVolume{} ) // Init will add the ReconcilePersistentVolume to the list.