From 71377bf21ba938716392362ea635ed850ecd7bf9 Mon Sep 17 00:00:00 2001 From: fengshunli <1171313930@qq.com> Date: Wed, 18 Jan 2023 11:18:45 +0800 Subject: [PATCH] format comment format Signed-off-by: fengshunli <1171313930@qq.com> --- pkg/crd/client/informers/externalversions/generic.go | 2 +- pkg/report/client.go | 2 +- pkg/report/publisher.go | 2 +- pkg/report/store.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/crd/client/informers/externalversions/generic.go b/pkg/crd/client/informers/externalversions/generic.go index caedaca8..fe28164f 100644 --- a/pkg/crd/client/informers/externalversions/generic.go +++ b/pkg/crd/client/informers/externalversions/generic.go @@ -52,7 +52,7 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=wgpolicyk8s.io, Version=v1alpha2 + // Group=wgpolicyk8s.io, Version=v1alpha2 case policyreportv1alpha2.SchemeGroupVersion.WithResource("clusterpolicyreports"): return &genericInformer{resource: resource.GroupResource(), informer: f.Wgpolicyk8s().V1alpha2().ClusterPolicyReports().Informer()}, nil case policyreportv1alpha2.SchemeGroupVersion.WithResource("policyreports"): diff --git a/pkg/report/client.go b/pkg/report/client.go index 9849a2c7..4e570762 100644 --- a/pkg/report/client.go +++ b/pkg/report/client.go @@ -8,7 +8,7 @@ type PolicyReportResultListener = func(PolicyReport, Result, bool) // PolicyReportClient watches for PolicyReport Events and executes registered callback type PolicyReportClient interface { - // WatchPolicyReports starts to watch for PolicyReport LifecycleEvent events + // Run WatchPolicyReports starts to watch for PolicyReport LifecycleEvent events Run(stopper chan struct{}) error // HasSynced the configured PolicyReport HasSynced() bool diff --git a/pkg/report/publisher.go b/pkg/report/publisher.go index c1f80d17..ef6fcfc6 100644 --- a/pkg/report/publisher.go +++ b/pkg/report/publisher.go @@ -11,7 +11,7 @@ type EventPublisher interface { UnregisterListener(string) // GetListener returns a list of all registered Listeners GetListener() map[string]PolicyReportListener - // Process LifecycleEvent with all registered listeners + // Publish Process LifecycleEvent with all registered listeners Publish(event LifecycleEvent) } diff --git a/pkg/report/store.go b/pkg/report/store.go index 7a651c60..3dbe8d45 100644 --- a/pkg/report/store.go +++ b/pkg/report/store.go @@ -9,7 +9,7 @@ type PolicyReportStore interface { Get(id string) (PolicyReport, bool) // Add a PolicyReport to the Store Add(r PolicyReport) error - // Add a PolicyReport to the Store + // Update a PolicyReport to the Store Update(r PolicyReport) error // Remove a PolicyReport with the given Type and ID from the Store Remove(id string) error