From 83da08b2982e2ffff8718111e88638bee492af2d Mon Sep 17 00:00:00 2001 From: Mikalai Radchuk <509198+m1kola@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:51:47 +0100 Subject: [PATCH] Adds error checking for feature gates (#98) Signed-off-by: Mikalai Radchuk --- pkg/features/features.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/features/features.go b/pkg/features/features.go index 5069cf09..796c858b 100644 --- a/pkg/features/features.go +++ b/pkg/features/features.go @@ -1,6 +1,7 @@ package features import ( + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/component-base/featuregate" ) @@ -17,5 +18,5 @@ var catalogdFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ var CatalogdFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate() func init() { - CatalogdFeatureGate.Add(catalogdFeatureGates) + utilruntime.Must(CatalogdFeatureGate.Add(catalogdFeatureGates)) }