mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-17 23:36:50 +00:00
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:
parent
eb7687a089
commit
aa276a5379
@ -78,8 +78,10 @@ func (a *Analysis) textOutput() ([]byte, error) {
|
|||||||
return []byte(output.String()), nil
|
return []byte(output.String()), nil
|
||||||
}
|
}
|
||||||
for n, result := range a.Results {
|
for n, result := range a.Results {
|
||||||
output.WriteString(fmt.Sprintf("%s %s(%s)\n", color.CyanString("%d", n),
|
output.WriteString(fmt.Sprintf("%s: %s %s(%s)\n", color.CyanString("%d", n),
|
||||||
color.YellowString(result.Name), color.CyanString(result.ParentObject)))
|
color.HiYellowString(result.Kind),
|
||||||
|
color.YellowString(result.Name),
|
||||||
|
color.CyanString(result.ParentObject)))
|
||||||
for _, err := range result.Error {
|
for _, err := range result.Error {
|
||||||
output.WriteString(fmt.Sprintf("- %s %s\n", color.RedString("Error:"), color.RedString(err.Text)))
|
output.WriteString(fmt.Sprintf("- %s %s\n", color.RedString("Error:"), color.RedString(err.Text)))
|
||||||
if err.KubernetesDoc != "" {
|
if err.KubernetesDoc != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user