From b54befc97dbd72e541246f5c7125f95054a67d40 Mon Sep 17 00:00:00 2001 From: zzr93 Date: Wed, 30 Mar 2022 20:47:46 +0800 Subject: [PATCH] cleanUp:check existence using basic method of set --- pkg/scheduler/framework/runtime/framework.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/runtime/framework.go b/pkg/scheduler/framework/runtime/framework.go index 1c4793dd28d..6b048489957 100644 --- a/pkg/scheduler/framework/runtime/framework.go +++ b/pkg/scheduler/framework/runtime/framework.go @@ -295,7 +295,7 @@ func NewFramework(r Registry, profile *config.KubeSchedulerProfile, opts ...Opti pluginsMap := make(map[string]framework.Plugin) for name, factory := range r { // initialize only needed plugins. - if _, ok := pg[name]; !ok { + if !pg.Has(name) { continue }