Skip to content
Snippets Groups Projects
Commit 7f9b05dc authored by ale's avatar ale
Browse files

Make ResultStore.Find() look in errors too

parent 4bb89a2b
No related branches found
No related tags found
No related merge requests found
......@@ -106,11 +106,19 @@ func (r *memResultStore) EachErrs(f func(*Result)) {
func (r *memResultStore) Find(id string) (out *Result) {
r.mx.Lock()
defer r.mx.Unlock()
r.last.Each(func(r *Result) {
if r.ID == id {
out = r
}
})
r.mx.Unlock()
if out != nil {
return
}
r.errs.Each(func(r *Result) {
if r.ID == id {
out = r
}
})
return
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment