mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-28 20:30:43 +00:00
chore: removes bar on normal analyze events
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
This commit is contained in:
parent
f337f6b447
commit
96d0d754ea
@ -83,16 +83,14 @@ var AnalyzeCmd = &cobra.Command{
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
var bar *progressbar.ProgressBar
|
if len(*analysisResults) == 0 {
|
||||||
if len(*analysisResults) > 0 {
|
|
||||||
bar = progressbar.Default(int64(len(*analysisResults)))
|
|
||||||
} else {
|
|
||||||
color.Green("{ \"status\": \"OK\" }")
|
color.Green("{ \"status\": \"OK\" }")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
var bar = progressbar.Default(int64(len(*analysisResults)))
|
||||||
// This variable is used to store the results that will be printed
|
if !explain {
|
||||||
// It's necessary because the heap memory is lost when the function returns
|
bar.Clear()
|
||||||
|
}
|
||||||
var printOutput []analyzer.Analysis
|
var printOutput []analyzer.Analysis
|
||||||
|
|
||||||
for _, analysis := range *analysisResults {
|
for _, analysis := range *analysisResults {
|
||||||
|
Loading…
Reference in New Issue
Block a user