0
0

use shorter go idiom

This commit is contained in:
Steve Yen 2015-12-29 22:14:45 -08:00
parent 6ddcde4c04
commit b605224106

View File

@ -144,10 +144,9 @@ func (f *Firestorm) Update(doc *document.Document) (err error) {
analysisStart := time.Now()
resultChan := make(chan *index.AnalysisResult)
aw := index.NewAnalysisWork(f, doc, resultChan)
// put the work on the queue
go func() {
f.analysisQueue.Queue(aw)
}()
go f.analysisQueue.Queue(aw)
// wait for the result
result := <-resultChan