From dee6ed96f8bcf0dd14a48a5a515ab0bce63b83c1 Mon Sep 17 00:00:00 2001 From: needsure Date: Tue, 9 Apr 2024 16:33:24 +0800 Subject: [PATCH] chore: fix function names in comment Signed-off-by: needsure --- core/pkg/containerscan/containerscan_mock.go | 2 +- core/pkg/hostsensorutils/hostsensordeploy.go | 2 +- core/pkg/hostsensorutils/hostsensorgetfrompod.go | 2 +- core/pkg/resourcehandler/resourcehandlerutils.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/pkg/containerscan/containerscan_mock.go b/core/pkg/containerscan/containerscan_mock.go index ba08017f..52352206 100644 --- a/core/pkg/containerscan/containerscan_mock.go +++ b/core/pkg/containerscan/containerscan_mock.go @@ -25,7 +25,7 @@ func GenerateContainerScanReportMock() ScanResultReport { return ds } -// GenerateContainerScanReportMock - generate a scan result +// GenerateContainerScanReportNoVulMock - generate a scan result func GenerateContainerScanReportNoVulMock() ScanResultReport { ds := ScanResultReport{ WLID: "wlid://cluster-k8s-geriatrix-k8s-demo3/namespace-whisky-app/deployment-whisky4all-shipping", diff --git a/core/pkg/hostsensorutils/hostsensordeploy.go b/core/pkg/hostsensorutils/hostsensordeploy.go index bfbdffc0..09e4ff91 100644 --- a/core/pkg/hostsensorutils/hostsensordeploy.go +++ b/core/pkg/hostsensorutils/hostsensordeploy.go @@ -307,7 +307,7 @@ func (hsh *HostSensorHandler) updatePodInListAtomic(ctx context.Context, eventTy } } -// tearDownNamespace manage the host-scanner deletion. +// tearDownHostScanner manage the host-scanner deletion. func (hsh *HostSensorHandler) tearDownHostScanner(namespace string) error { client := hsh.k8sObj.KubernetesClient diff --git a/core/pkg/hostsensorutils/hostsensorgetfrompod.go b/core/pkg/hostsensorutils/hostsensorgetfrompod.go index 239e71bd..749e2e77 100644 --- a/core/pkg/hostsensorutils/hostsensorgetfrompod.go +++ b/core/pkg/hostsensorutils/hostsensorgetfrompod.go @@ -155,7 +155,7 @@ func (hsh *HostSensorHandler) getKubeProxyInfo(ctx context.Context) ([]hostsenso return hsh.sendAllPodsHTTPGETRequest(ctx, "/kubeProxyInfo", KubeProxyInfo) } -// getControlPlanInfo returns the list of controlPlaneInfo metadata +// getControlPlaneInfo returns the list of controlPlaneInfo metadata func (hsh *HostSensorHandler) getControlPlaneInfo(ctx context.Context) ([]hostsensor.HostSensorDataEnvelope, error) { // loop over pods and port-forward it to each of them return hsh.sendAllPodsHTTPGETRequest(ctx, "/controlPlaneInfo", ControlPlaneInfo) diff --git a/core/pkg/resourcehandler/resourcehandlerutils.go b/core/pkg/resourcehandler/resourcehandlerutils.go index 86968d88..4da958f5 100644 --- a/core/pkg/resourcehandler/resourcehandlerutils.go +++ b/core/pkg/resourcehandler/resourcehandlerutils.go @@ -114,7 +114,7 @@ func filterRuleMatchesForResource(resourceKind string, matchObjects []reporthand return resourceMap } -// updateQueryableResourcesMapFromMatch updates the queryableResources map with the relevant resources from the match object. +// updateQueryableResourcesMapFromRuleMatchObject updates the queryableResources map with the relevant resources from the match object. // if namespace is not empty, the namespace filter is added to the queryable resources (which are namespaced) // if resourcesFilterMap is not nil, only the resources with value 'true' will be added to the queryable resources func updateQueryableResourcesMapFromRuleMatchObject(match *reporthandling.RuleMatchObjects, resourcesFilterMap map[string]bool, queryableResources QueryableResources, namespace string) {