mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
Wrote new tests for `categorytable` and `frameworkscan` Refactored the `shortFormatRow` function for: - Imporved readability - Consistency - Improve code modularity - Encapsulation: The formatted string construction is encapsulated within the function, maintaining code modularity and separation of concerns. Added the `MockISeverityCounters` mock struct to test the `renderSeverityCountersSummary` function. Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Kubescape core package
// initialize kubescape
ks := core.NewKubescape()
// scan cluster
results, err := ks.Scan(&cautils.ScanInfo{})
// convert scan results to json
jsonRes, err := results.ToJson()