feat: add Resource Kind in output (#1069)

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Peter Pan 2024-04-21 04:11:02 +08:00 committed by GitHub
parent eb7687a089
commit aa276a5379
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,8 +78,10 @@ func (a *Analysis) textOutput() ([]byte, error) {
return []byte(output.String()), nil
}
for n, result := range a.Results {
output.WriteString(fmt.Sprintf("%s %s(%s)\n", color.CyanString("%d", n),
color.YellowString(result.Name), color.CyanString(result.ParentObject)))
output.WriteString(fmt.Sprintf("%s: %s %s(%s)\n", color.CyanString("%d", n),
color.HiYellowString(result.Kind),
color.YellowString(result.Name),
color.CyanString(result.ParentObject)))
for _, err := range result.Error {
output.WriteString(fmt.Sprintf("- %s %s\n", color.RedString("Error:"), color.RedString(err.Text)))
if err.KubernetesDoc != "" {