From b605224106aab338a91f8c33465c10968fba2c95 Mon Sep 17 00:00:00 2001 From: Steve Yen Date: Tue, 29 Dec 2015 22:14:45 -0800 Subject: [PATCH] use shorter go idiom --- index/firestorm/firestorm.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index/firestorm/firestorm.go b/index/firestorm/firestorm.go index 839665e2..00257296 100644 --- a/index/firestorm/firestorm.go +++ b/index/firestorm/firestorm.go @@ -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