mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
In this change I used both claude code and Antigravity. --------- Signed-off-by: Bezalel Brandwine <bez@softwine.net>
17 lines
574 B
Go
17 lines
574 B
Go
package hostsensorutils
|
|
|
|
import (
|
|
"github.com/kubescape/k8s-interface/hostsensor"
|
|
"github.com/kubescape/k8s-interface/k8sinterface"
|
|
"github.com/kubescape/opa-utils/reporthandling/apis"
|
|
)
|
|
|
|
func addInfoToMap(resource hostsensor.HostSensorResource, infoMap map[string]apis.StatusInfo, err error) {
|
|
group, version := k8sinterface.SplitApiVersion(hostsensor.MapHostSensorResourceToApiGroup(resource))
|
|
r := k8sinterface.JoinResourceTriplets(group, version, resource.String())
|
|
infoMap[r] = apis.StatusInfo{
|
|
InnerStatus: apis.StatusSkipped,
|
|
InnerInfo: err.Error(),
|
|
}
|
|
}
|