mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-06 17:51:28 +00:00
feat: filters api (#407)
* fix: stop execution after matching condition in RunAnalysis() The commit fixes the issue where the RunAnalysis() function continues execution even after matching a condition. The fix ensures that the execution stops at the end of the corresponding if statement, improving the control flow and preventing unnecessary processing. Signed-off-by: Matthis Holleville <matthish29@gmail.com> * feat: include filters parameter in AnalyzeRequest initialization The commit introduces a new feature where the filters parameter is included in the initialization of the AnalyzeRequest. This enhancement allows for more specific analysis by specifying filters during the analysis process. Signed-off-by: Matthis Holleville <matthish29@gmail.com> --------- Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
@@ -152,6 +152,7 @@ func (a *Analysis) RunAnalysis() {
|
||||
|
||||
}
|
||||
wg.Wait()
|
||||
return
|
||||
}
|
||||
semaphore = make(chan struct{}, a.MaxConcurrency)
|
||||
// if the filters flag is specified
|
||||
@@ -180,6 +181,7 @@ func (a *Analysis) RunAnalysis() {
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
return
|
||||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
Reference in New Issue
Block a user