INNER CODE UNIT · Go
func
Legit-Labs/legitify · cmd/analyze_executor.go:37
func (r *analyzeExecutor) Run() error {
defer errlog.FlushAll()
// let progress bar run in the background
pWaiter := progressbar.Run()
// start all pipeline parts in the background
collectionChan := r.manager.Collect()
analyzedDataChan := r.analyzer.Analyze(collectionChan)
enrichedDataChan := r.enricherManager.Enrich(r.ctx, analyzedDataChan)
outputWaiter := r.out.Digest(enrichedDataChan)
// wait for progress bars to finish before outputting
pWaiter.Wait()
// wait for output to be digested
outputWaiter.Wait()