From 2c3bb5736ef958246775c21729020bfa11d1db08 Mon Sep 17 00:00:00 2001 From: guoxudong Date: Fri, 5 Feb 2021 11:02:23 +0800 Subject: [PATCH 1/2] fix print stayus --- cmd/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/utils.go b/cmd/utils.go index 43029bc7..207ef342 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -256,6 +256,7 @@ func MoreInfo(clientSet *kubernetes.Clientset) error { kv["Node"] = len(nodesList.Items) kv["Pod"] = len(podsList.Items) printKV(os.Stdout, "[Summary] ", kv) + return nil } @@ -361,7 +362,7 @@ func printKV(out io.Writer, prefix string, kv map[string]int) { fmt.Fprint(out, prefix) ct.ResetColor() for k, v := range kv { - ct.ChangeColor(ct.Blue, false, ct.None, false) + ct.ChangeColor(ct.Cyan, false, ct.None, false) fmt.Fprint(out, k) fmt.Fprint(out, ": ") ct.ResetColor() @@ -370,6 +371,7 @@ func printKV(out io.Writer, prefix string, kv map[string]int) { ct.ResetColor() fmt.Fprint(out, " ") } + fmt.Fprint(out, "\n") } func printYellow(out io.Writer, content string) { From 0904f8e30810899c2e2644525a16bf13bd794cb4 Mon Sep 17 00:00:00 2001 From: guoxudong Date: Fri, 5 Feb 2021 11:03:09 +0800 Subject: [PATCH 2/2] fix --- cmd/utils.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/utils.go b/cmd/utils.go index 207ef342..3161d503 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -256,7 +256,6 @@ func MoreInfo(clientSet *kubernetes.Clientset) error { kv["Node"] = len(nodesList.Items) kv["Pod"] = len(podsList.Items) printKV(os.Stdout, "[Summary] ", kv) - return nil }