use shorter go idiom
This commit is contained in:
parent
6ddcde4c04
commit
b605224106
@ -144,10 +144,9 @@ func (f *Firestorm) Update(doc *document.Document) (err error) {
|
|||||||
analysisStart := time.Now()
|
analysisStart := time.Now()
|
||||||
resultChan := make(chan *index.AnalysisResult)
|
resultChan := make(chan *index.AnalysisResult)
|
||||||
aw := index.NewAnalysisWork(f, doc, resultChan)
|
aw := index.NewAnalysisWork(f, doc, resultChan)
|
||||||
|
|
||||||
// put the work on the queue
|
// put the work on the queue
|
||||||
go func() {
|
go f.analysisQueue.Queue(aw)
|
||||||
f.analysisQueue.Queue(aw)
|
|
||||||
}()
|
|
||||||
|
|
||||||
// wait for the result
|
// wait for the result
|
||||||
result := <-resultChan
|
result := <-resultChan
|
||||||
|
Loading…
Reference in New Issue
Block a user